diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2012-11-25 21:24:58 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2012-11-25 21:24:58 +0100 |
commit | 16262790cb6ddacf6c632625cc865e03b1b8671f (patch) | |
tree | 09898d65deef518380915ecdc7575756c9ca8595 /src/bird | |
parent | 7bb1499a7cd539f714bb7f603d7fc0a38fd8a963 (diff) | |
download | rcdscripts-16262790cb6ddacf6c632625cc865e03b1b8671f.tar.xz |
rcdscripts: import first snapshot of rc.d scripts as of 11.25.20122012.11.25
In 30 days these scripts will start dissapearing from official Arch
Linux packages. This is an attempt to conserve them, and keep sysvinit
usable.
Diffstat (limited to 'src/bird')
-rwxr-xr-x | src/bird/bird.rc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/bird/bird.rc b/src/bird/bird.rc new file mode 100755 index 0000000..a3aa5e4 --- /dev/null +++ b/src/bird/bird.rc @@ -0,0 +1,33 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +DAEMON=/usr/sbin/${0##*/} +PID=$(pidof -o %PPID $DAEMON) + +case "$1" in + start) + stat_busy "Starting ${0##*/} daemon" + [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon ${0##*/} && stat_done && exit 0 + stat_fail + ;; + stop) + stat_busy "Stopping ${0##*/} daemon" + [[ $PID ]] && kill $PID &> /dev/null && rm_daemon ${0##*/} && stat_done && exit 0 + stat_fail + ;; + restart) + $0 stop + $0 start + exit 0 + ;; + *) + echo "usage: ${0##*/} {start|stop|restart}" >&2 + ;; +esac + +exit 1 + +# vim:set ts=2 sw=2 ft=sh et: |