blob: e288b95a8ce8fa4a56749f9659017d0c61013c05 (
plain)
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
34
35
36
|
#!/bin/bash
. /lib/lsb/init-functions
. /etc/sysconfig/syslog-ng
case $1 in
start)
log_info_msg "Starting Syslog-NG"
syslog-ng -s "${SYSLOG_NG_CHECKOPTS[@]}"
evaluate_retval
start_daemon /usr/sbin/syslog-ng "${SYSLOG_NG_OPTS[@]}"
evaluate_retval
;;
stop)
log_info_msg "Stopping Syslog-NG"
killproc /usr/sbin/syslog-ng
evaluate_retval
;;
reload)
log_info_msg "Reloading Syslog-NG configuration and re-opening log files"
syslog-ng -s "${SYSLOG_NG_CHECKOPTS[@]}"
evaluate_retval
killall -HUP /usr/sbin/syslog-ng
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/syslog-ng
;;
*)
echo "usage: $0 {start|stop|restart|reload|status}"
esac
|