Changeset 9 for scripts/usr/local/bin/7dtd-kill.sh
- Timestamp:
- May 15, 2014, 8:38:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/bin/7dtd-kill.sh
r1 r9 1 1 #!/bin/bash 2 /etc/init.d/7dtd.sh stop 2 # Tries to stop the 7dtd instance given as first parameter. 3 # Returns: 4 # 0 : Done 5 # 1 : Was not running 6 # 2 : No instance name given 7 # 3 : No such instance 8 9 . /usr/local/bin/7dtd-common.sh 10 checkRootLoadConf 11 12 checkInstance $1 13 14 res=$(isRunning $1) 15 if [ $res -eq 1 ]; then 16 telnetCommand shutdown 17 start-stop-daemon --stop --pidfile $(getInstancePath $1)/7dtd.pid 18 rm $(getInstancePath $1)/7dtd.pid 19 echo "Done" 20 exit 0 21 else 22 echo "7dtd instance $1 is NOT running" 23 exit 1 24 fi
Note:
See TracChangeset
for help on using the changeset viewer.