Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
71 lines (63 loc) · 1.31 KB

File metadata and controls

71 lines (63 loc) · 1.31 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# HTTPSCWS Startup script for the SCWS HTTP Server
# this script create it by ivan at 2016.01.14.
#
# chkconfig: - 95 15
# description: HTTPSCWS is an Chinese Word Segmentation System Based on the HTTP protocol.
# processname: httpscws
# pidfile: /var/run/httpscws.pid
# config: /etc/scws/
httpscws=/usr/local/httpscws/bin/httpscws
httpscws_config=/etc/scws/
pid=/var/run/httpscws.pid
RETVAL=0
prog="httpscws"
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $httpscws ] || exit 0
# Start searchd daemons functions.
start(){
if [ -e $pid ]; then
echo "$prog already running..."
exit 1
fi
echo -n $"Starting $prog:"
daemon $httpscws -l 127.0.0.1 -d -i ${pid} -x ${httpscws_config}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/httpscws
return $RETVAL
}
# Stop searchd daemons functions.
stop(){
echo -n $"Stopping $prog:"
killproc $httpscws
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpscws $pid
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|status|help}"
exit 1
esac
exit $RETVAL
Morty Proxy This is a proxified and sanitized view of the page, visit original site.