aboutsummaryrefslogtreecommitdiff
path: root/app/admin/syslog-ng/rc.syslog-ng.new
blob: 513154f73d90c373e1de221d36fa0de4f59babb5 (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
37
#!/bin/sh
# Start/stop/restart the system logging daemons.
#
# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>.
# Modyfied for syslog-ng by Kanedaaa <kaneda@bohater.net>

syslogng_start() {
  if [ -x /usr/sbin/syslog-ng ]; then
    echo -n "Starting syslog-ng daemon:  "
    echo " /usr/sbin/syslog-ng"
    /usr/sbin/syslog-ng
  fi
}

syslogng_stop() {
  killall syslog-ng 2> /dev/null
}

syslogng_restart() {
  syslogng_stop
  sleep 1
  syslogng_start
}

case "$1" in
'start')
  syslogng_start
  ;;
'stop')
  syslogng_stop
  ;;
'restart')
  syslogng_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac