diff options
author | Joe <joe@joelightning.com> | 2011-11-10 11:31:23 +0000 |
---|---|---|
committer | Joe <joe@joelightning.com> | 2011-11-10 11:31:23 +0000 |
commit | c40170cb03e41bd1efe775bbd430a50da6cdeea4 (patch) | |
tree | 0cc4c0f5cc41c502a0dff8fdca124cab2bd0dab5 /contrib/init-scripts |
First commit, pbot-ng already works.
Diffstat (limited to 'contrib/init-scripts')
-rw-r--r-- | contrib/init-scripts/envbot.debian | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/init-scripts/envbot.debian b/contrib/init-scripts/envbot.debian new file mode 100644 index 0000000..971bd09 --- /dev/null +++ b/contrib/init-scripts/envbot.debian @@ -0,0 +1,48 @@ +#!/bin/bash +# -*- coding: utf-8 -*- +########################################################################### +# # +# envbot - an IRC bot in bash # +# Copyright (C) 2007 Remo Ford # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +# # +########################################################################### + +ENVBOT_DIR="/path/to/envbot" +ENVBOT_OPTIONS="" +ENVBOT_USER="envbot" +PID_FILE="/var/run/envbot.pid" + +test -f /lib/lsb/init-functions || exit 1 +. /lib/lsb/init-functions + +case "$1" in + start) + log_begin_msg "Starting envbot..." + start-stop-daemon -b -d $ENVBOT_DIR --start -m -p $PID_FILE -c $ENVBOT_USER --exec $ENVBOT_DIR/envbot $ENVBOT_OPTIONS || log_end_msg 1 + log_end_msg 0 + ;; + stop) + log_begin_msg "Stopping envbot..." + start-stop-daemon --stop --quiet -p $PID_FILE || log_end_msg 1 + log_end_msg 0 + ;; + *) + log_success_msg "Usage: /etc/init.d/envbot {start|stop}" + exit 1 + ;; +esac + +exit 0 |