-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwssd
More file actions
executable file
·39 lines (32 loc) · 818 Bytes
/
wssd
File metadata and controls
executable file
·39 lines (32 loc) · 818 Bytes
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
#!/bin/bash
# chkconfig: 2345 95 20
# description: Description of the script
# processname: wssd
# .You need to set the WORK_DIR and DAEMON. Then you can copy this file to /etc/init.d.
# .For your daemon to be run each time you restart: chkconfig --add wssd && chkconfig wssd on
WORK_DIR="/path-to-folder-containing-WSSDaemon.exe"
DAEMON="/path-to-WSSDaemon.exe"
PIDFILE="/var/run/WSSDaemon.pid"
USER="root"
SERVICE_NAME="WSSDaemon"
case "$1" in
start)
echo "Starting server"
mkdir -p "$WORK_DIR"
/usr/local/bin/mono-service -d:$WORK_DIR -l:$PIDFILE -m:$SERVICE_NAME -n:$SERVICE_NAME $DAEMON
;;
stop)
echo "Stopping server"
kill `cat $PIDFILE`
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0