source: scripts/usr/local/bin/7dtd-kill.sh @ 9

Last change on this file since 9 was 9, checked in by alloc, 10 years ago

Fix #1, #2, #3, #5; Refs #4, #6: WD works for save path, not for some logs

  • Property svn:executable set to *
File size: 490 bytes
Line 
1#!/bin/bash
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
10checkRootLoadConf
11
12checkInstance $1
13
14res=$(isRunning $1)
15if [ $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
21else
22        echo "7dtd instance $1 is NOT running"
23        exit 1
24fi
Note: See TracBrowser for help on using the repository browser.