diff options
author | Richard Purdie <richard@openedhand.com> | 2007-01-30 22:52:51 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-01-30 22:52:51 +0000 |
commit | 52c2e1a00f220905c4b28347c15daac3df5881b2 (patch) | |
tree | f5a754176d30bcea095ad5d84b58dc763a478a77 /meta-extras/packages/syslog-ng/files/initscript | |
parent | 81f0ee53d5c1bbb33c256c909bb5b7b16dcf8f7c (diff) | |
download | poky-52c2e1a00f220905c4b28347c15daac3df5881b2.tar.gz |
Add syslog-ng to poky-extras
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1235 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta-extras/packages/syslog-ng/files/initscript')
-rw-r--r-- | meta-extras/packages/syslog-ng/files/initscript | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-extras/packages/syslog-ng/files/initscript b/meta-extras/packages/syslog-ng/files/initscript new file mode 100644 index 0000000000..b95e8adc20 --- /dev/null +++ b/meta-extras/packages/syslog-ng/files/initscript | |||
@@ -0,0 +1,45 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for openembedded | ||
4 | # Copy it to /etc/init.d/syslog-ng and type | ||
5 | # > update-rc.d syslog-ng defaults 5 | ||
6 | # | ||
7 | |||
8 | |||
9 | syslog_ng=/usr/sbin/syslog-ng | ||
10 | test -x "$syslog_ng" || exit 0 | ||
11 | |||
12 | case "$1" in | ||
13 | start) | ||
14 | echo -n "Starting syslog-ng:" | ||
15 | start-stop-daemon --start --quiet --exec $syslog_ng | ||
16 | echo "." | ||
17 | ;; | ||
18 | stop) | ||
19 | echo -n "Stopping syslog-ng:" | ||
20 | start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid | ||
21 | echo "." | ||
22 | ;; | ||
23 | reload|force-reload) | ||
24 | start-stop-daemon --stop --quiet --signal 1 --exec $syslog_ng | ||
25 | ;; | ||
26 | restart) | ||
27 | echo "Stopping syslog-ng:" | ||
28 | start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid | ||
29 | echo -n "Waiting for syslog-ng to die off" | ||
30 | for i in 1 2 3 ; | ||
31 | do | ||
32 | sleep 1 | ||
33 | echo -n "." | ||
34 | done | ||
35 | echo "" | ||
36 | echo -n "Starting syslog-ng:" | ||
37 | start-stop-daemon --start --quiet --exec $syslog_ng | ||
38 | echo "." | ||
39 | ;; | ||
40 | *) | ||
41 | echo "Usage: /etc/init.d/syslog-ng {start|stop|reload|restart|force-reload}" | ||
42 | exit 1 | ||
43 | esac | ||
44 | |||
45 | exit 0 | ||