diff options
author | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-20 20:23:12 +0000 |
---|---|---|
committer | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-20 20:23:12 +0000 |
commit | d8e3cbb7e1ae86507b7cfd8142be8a1e7323270f (patch) | |
tree | 604773c65fdddff8365cc45027defcf9a4b21cca /packages/bitlbee/files/init-script | |
parent | e93dabbb3ecc45cfd55f5ef103479e2b3d4ccd1e (diff) | |
parent | 1bfb615d5157cf619a9d40189ed992f8958ce4c6 (diff) |
merge of '635b19191517f99ee151ae6157a22f5d56406238'
and 'c179e5e451e08eb1f3266b4da027de66abad7a9b'
Diffstat (limited to 'packages/bitlbee/files/init-script')
-rw-r--r-- | packages/bitlbee/files/init-script | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/bitlbee/files/init-script b/packages/bitlbee/files/init-script new file mode 100644 index 0000000000..3ec3fdfb4a --- /dev/null +++ b/packages/bitlbee/files/init-script @@ -0,0 +1,31 @@ +#!/bin/sh + +case "$1" in + start) + echo "Starting bitlbee daemon" + start-stop-daemon --start --startas BITLBEED_EXEC \ + -c nobody:nogroup --exec BITLBEED_EXEC -- \ + BITLBEED_OPTS /usr/sbin/bitlbee + [ $? -eq 0 ] || echo $? "Failed to start bitlbee daemon" + ;; + + stop) + echo "Stopping bitlbee daemon" + start-stop-daemon --stop --signal 9 \ + --exec BITLBEED_EXEC + [ $? -eq 0 ] || echo $? "Failed to stop bitlbee daemon" + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop }" + exit 1 + ;; +esac + +exit 0 |