source: scripts/etc/init.d/7dtd.sh@ 16

Last change on this file since 16 was 15, checked in by alloc, 11 years ago

Init script updated to current commons

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#!/bin/sh
2# Version 3
3
4### BEGIN INIT INFO
5# Provides: 7dtd-server
6# Required-Start: $remote_fs
7# Required-Stop: $remote_fs
8# Should-Start: $named
9# Should-Stop: $named
10# Default-Start: 2 3 4 5
11# Default-Stop: 0 1 6
12# Short-Description: 7 Days to Die server
13# Description: Starts a 7 Days to Die server
14### END INIT INFO
15
16. /usr/local/bin/7dtd-common.sh
17checkRootLoadConf
18
19case "$1" in
20 start)
21 echo "Starting all 7dtd instances:"
22 for I in $(getInstanceList); do
23 echo "Starting: $I"
24 /usr/local/bin/7dtd-start.sh $I
25 done
26 echo "All done"
27 ;;
28 stop)
29 echo "Stopping all 7dtd instances:"
30 for I in $(getInstanceList); do
31 echo "Stopping: $I"
32 /usr/local/bin/7dtd-kill.sh $I
33 echo
34 echo
35 done
36 echo "All done"
37 ;;
38 status)
39 /usr/local/bin/7dtd-instances.sh
40 ;;
41 *)
42 echo "Usage: ${0} {start|stop|status}"
43 exit 2
44esac
45exit 0
Note: See TracBrowser for help on using the repository browser.