author | Michael Krelin <hacker@klever.net> | 2011-10-10 21:21:36 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2011-10-12 19:58:30 (UTC) |
commit | e402d5619a9dd86e0f51fa39418f4db490ef1037 (patch) (unidiff) | |
tree | 69b9176d76d71b5f147c8a93830e1b6d66f3daa1 /debian/dudki.init | |
parent | 970337c91c02afa9b8d33ab5596270594ffe58e6 (diff) | |
download | dudki-master.zip dudki-master.tar.gz dudki-master.tar.bz2 |
Ubuntization to be precise.
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | debian/dudki.init | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/dudki.init b/debian/dudki.init new file mode 100644 index 0000000..aaab403 --- a/dev/null +++ b/debian/dudki.init | |||
@@ -0,0 +1,58 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # dudki dudki startup script | ||
4 | # | ||
5 | |||
6 | ### BEGIN INIT INFO | ||
7 | # Provides: dudki | ||
8 | # Required-Start: $local_fs $remote_fs $syslog | ||
9 | # Required-Stop: $local_fs $remote_fs $syslog | ||
10 | # Should-Start: | ||
11 | # Should-Stop: | ||
12 | # Default-Start: S 2 3 4 5 | ||
13 | # Default-Stop: 0 1 6 | ||
14 | # Short-Description: a process maintenance daemon | ||
15 | ### END INIT INFO | ||
16 | |||
17 | # Edit /etc/default/dudki to change options | ||
18 | DUDKI_CONF=/etc/dudki.conf | ||
19 | |||
20 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
21 | DUDKI=/usr/sbin/dudki | ||
22 | NAME=dudki | ||
23 | DESC="process maintenance daemon" | ||
24 | |||
25 | [ -x $DUDKI ] || exit 0 | ||
26 | |||
27 | . /lib/lsb/init-functions | ||
28 | |||
29 | [ -f /etc/default/$NAME ] && . /etc/default/$NAME | ||
30 | |||
31 | case "$1" in | ||
32 | start) | ||
33 | log_daemon_msg "Starting $DESC $NAME" | ||
34 | $DUDKI -e | ||
35 | log_end_msg $? | ||
36 | ;; | ||
37 | stop) | ||
38 | log_daemon_msg "Stopping $DESC $NAME" | ||
39 | $DUDKI -k | ||
40 | log_end_msg $? | ||
41 | ;; | ||
42 | reload) | ||
43 | log_daemon_msg "Reloading $NAME configuration" | ||
44 | $DUDKI -r | ||
45 | log_end_msg $? | ||
46 | ;; | ||
47 | restart|force-reload) | ||
48 | $0 stop | ||
49 | sleep 1 | ||
50 | $0 start | ||
51 | ;; | ||
52 | *) | ||
53 | echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 | ||
54 | exit 1 | ||
55 | ;; | ||
56 | esac | ||
57 | |||
58 | exit 0 | ||