diff options
author | Andrew Manison <amanison@anselsystems.com> | 2010-04-13 19:21:04 +0000 |
---|---|---|
committer | Andrew Manison <amanison@anselsystems.com> | 2010-04-13 19:21:04 +0000 |
commit | 0a605049043637a44f94e92cc6248ba8807306dd (patch) | |
tree | cfedcd39f7dfa617aa8c7d50ef56f28d545fbf81 /testing/sircbot/sircbot.initd | |
parent | 97a19460d006618b87187827f8d8a4aa6ecf0468 (diff) | |
parent | 4fb971ce31073d9b670ab9243295290aecc38501 (diff) | |
download | aports-0a605049043637a44f94e92cc6248ba8807306dd.tar.bz2 aports-0a605049043637a44f94e92cc6248ba8807306dd.tar.xz |
Merge remote branch 'alpine/master'
Diffstat (limited to 'testing/sircbot/sircbot.initd')
-rw-r--r-- | testing/sircbot/sircbot.initd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/sircbot/sircbot.initd b/testing/sircbot/sircbot.initd new file mode 100644 index 000000000..2e0a9c330 --- /dev/null +++ b/testing/sircbot/sircbot.initd @@ -0,0 +1,35 @@ +#!/sbin/runscript + +daemon=/usr/bin/sircbot +sircbot_user=${sircbot_user:-sircbot} +sircbot_group=${sircbot_group:-sircbot} +pidfile=/var/run/sircbot/sircbot.pid + +depends() { + need net + after firewall +} + +checkonfig() { + if [ -z "$sircbot_channels" ]; then + eerror "Please specify sircbot_channels in /etc/conf.d/sircbot" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting sircbot" + start-stop-daemon --start --user $sircbot_user --group $sircbot_group \ + --umask 0002 --pidfile "$pidfile" \ + --exec $daemon -- $sircbot_opts $sircbot_channels + eend $? +} + +stop() { + ebegin "Stopping sircbot" + start-stop-daemon --stop --pidfile "$pidfile" --exec $daemon + eend $? +} + |