-
Notifications
You must be signed in to change notification settings - Fork 143
/
ss.init
34 lines (31 loc) · 847 Bytes
/
ss.init
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
#!/bin/bash
# chkconfig: 2345 55 25
# description: baota - ss-plugin
### BEGIN INIT INFO
# Provides: ss
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts ss
# Description: starts the ss
### END INIT INFO
configFile=/www/server/panel/plugin/ss/config.json
if [ ! -f $configFile ];then
echo 'Ss-plugin plug-in is not installed.'
exit;
fi
case "$1" in
'start')
ssserver -c $configFile -d start --user ssuser
;;
'stop')
ssserver -c $configFile -d stop --user ssuser
;;
'restart')
ssserver -c $configFile -d restart --user ssuser
;;
*)
echo "Usage: /etc/init.d/ss {start|stop|restart}"
;;
esac