-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinitWS
More file actions
executable file
·37 lines (34 loc) · 866 Bytes
/
initWS
File metadata and controls
executable file
·37 lines (34 loc) · 866 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
#!/bin/sh
#
# starts/stops wolfshade mud server
MUD_HOME=/opt/wsmud
MUD_OWNER=dcomes
killproc() { # kill the named process(es)
pid=`/bin/ps -e |
/bin/grep $1 |
/bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] && kill $pid
}
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting WolfshadeMUD Server: "
su - "$MUD_OWNER" -c "$MUD_HOME/AutoRun.sh" > /dev/null 2>&1 &
touch /var/lock/subsys/wsmudd
echo
;;
stop)
# Stop daemons.
echo -n "Shutting down WolfshadeMUD Server: "
#theirs got to be a better way!
killproc wolfshade
killproc AutoRun.sh
rm -f /var/lock/subsys/wsmudd
echo
;;
*)
echo "Usage: initWS {start|stop}"
exit 1
esac
exit 0