blob: bfe45d6b33ad62cbc2799e67ebd59eb713516502 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/bash
. `dirname $0`/functions
option config standard_option /etc/syslog-ng/syslog-ng.conf
option nice standard_option 0
option chain standard_option
option pidfile reserved_option /var/run/syslog-ng.pid
option bin reserved_option /sbin/syslog-ng
option cmdline reserved_option 'nice -n $opt_nice $bin -f $opt_config -p $pidfile'
# we might want to start klogd right after syslog-ng
function fct_post_start {
if [ -n "$opt_chain" ]; then
/sbin/init.d/$opt_chain start >/dev/null 2>&1 || echo "Error starting $opt_chain."
fi
}
function fct_pre_stop {
if [ -n "$opt_chain" ]; then
/sbin/init.d/$opt_chain stop >/dev/null 2>&1 || echo "Error stopping $opt_chain."
fi
}
function do_update {
if [ -e $pidfile ] ; then
read < $pidfile
[ "$REPLY" ] && kill -HUP $REPLY > /dev/null 2>&1
fi
}
load_config
|