summaryrefslogtreecommitdiff
path: root/source/n/ulogd/rc.ulogd
blob: d7e2fb1bbdc4f9ca7aa881628b042ecb35f5c2e6 (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/sh
#
# Start/stop/restart ulogd 
#

ulogd_start() {
  if [ -x /usr/sbin/ulogd ]; then
    echo "Starting ulogd daemon:  /usr/sbin/ulogd "
    /usr/sbin/ulogd -d 2> /dev/null
  fi
}

ulogd_stop() {
  killall ulogd 2> /dev/null
}

ulogd_restart() {
  ulogd_stop
  sleep 1
  ulogd_start
}

case "$1" in
'start')
 ulogd_start
  ;;
'stop')
  ulogd_stop
  ;;
'restart')
 ulogd_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac