diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-17 08:53:53 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-17 08:53:53 +0000 |
commit | 11186610007134faa0cf463ab70d54fde7acf74a (patch) | |
tree | fc38aa14017c80d2dfcdeb8b0a6d70a923c77f6c /main/sircbot/sircbot.initd | |
parent | 0a665610233b1a135f8a058f897c61eedbd962f9 (diff) | |
download | aports-11186610007134faa0cf463ab70d54fde7acf74a.tar.bz2 aports-11186610007134faa0cf463ab70d54fde7acf74a.tar.xz |
main/sircbot: moved from testing
Diffstat (limited to 'main/sircbot/sircbot.initd')
-rw-r--r-- | main/sircbot/sircbot.initd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/main/sircbot/sircbot.initd b/main/sircbot/sircbot.initd new file mode 100644 index 000000000..045f7ee2a --- /dev/null +++ b/main/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 +} + +checkconfig() { + 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 $? +} + |