apparmor initscript + some perl dnssec stuff
[mirrors/ArchLinux-Packages.git] / mcelog / mcelog.rc
1 #!/bin/bash
2
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5
6 PID=`pidof -o %PPID /usr/sbin/mcelog`
7 case "$1" in
8 start)
9 stat_busy "Starting mcelog"
10 if [ -z "$PID" ]; then
11 /usr/sbin/mcelog --daemon --pidfile /var/run/mcelog.pid
12 fi
13 if [ ! -z "$PID" -o $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon mcelog
17 stat_done
18 fi
19 ;;
20 stop)
21 stat_busy "Stopping mcelog"
22 [ ! -z "$PID" ] && kill $PID &>/dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon mcelog
27 stat_done
28 fi
29 ;;
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
34 ;;
35 *)
36 echo "usage: $0 {start|stop|restart}"
37 esac
This page took 2.016483 seconds and 4 git commands to generate.