Initial checkin.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
commit
30132626b8
68 changed files with 5497 additions and 0 deletions
37
bin/ircbot.sh
Normal file
37
bin/ircbot.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
######################################################################
|
||||
#
|
||||
# $Id: ircbot.sh 283 2011-02-18 00:17:33Z alba $
|
||||
#
|
||||
######################################################################
|
||||
export "LANG=C"
|
||||
export "LC_ALL=C"
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
pidfile="${HOME}/var/ircbot.pid"
|
||||
logfile="${HOME}/var/ircbot.log"
|
||||
config="${HOME}/etc/public.conf"
|
||||
|
||||
do_stop()
|
||||
{
|
||||
if [ -s "${pidfile}" ]; then
|
||||
kill $(cat "${pidfile}") || echo status=$?
|
||||
rm "${pidfile}"
|
||||
fi
|
||||
}
|
||||
|
||||
do_start()
|
||||
{
|
||||
${HUHU_DIR}/bin/ircbot.pl "-config=${config}" "-pidfile=${pidfile}" \
|
||||
> "${logfile}" 2>&1 &
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
start) do_start ;;
|
||||
restart) do_stop; do_start ;;
|
||||
stop) do_stop ;;
|
||||
*) echo "Usage: ircbot.sh {start|stop|restart}"
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue