[Pkg-irc-commits] r190 - in /packages/inspircd/trunk/debian: changelog inspircd.init
cate at users.alioth.debian.org
cate at users.alioth.debian.org
Thu Mar 20 08:08:30 UTC 2008
Author: cate
Date: Thu Mar 20 08:08:30 2008
New Revision: 190
URL: http://svn.debian.org/wsvn/pkg-irc/?sc=1&rev=190
Log:
inspircd: cleanup of init.d script
Modified:
packages/inspircd/trunk/debian/changelog
packages/inspircd/trunk/debian/inspircd.init
Modified: packages/inspircd/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-irc/packages/inspircd/trunk/debian/changelog?rev=190&op=diff
==============================================================================
--- packages/inspircd/trunk/debian/changelog (original)
+++ packages/inspircd/trunk/debian/changelog Thu Mar 20 08:08:30 2008
@@ -1,3 +1,11 @@
+inspircd (1.1.17+dfsg-2) UNRELEASED; urgency=low
+
+ [ Giacomo Catenazzi ]
+ * init.d script: cleanup (remove bashism, add cron, remove sleep,
+ remove unused exit)
+
+ -- Giacomo Catenazzi <cate at debian.org> Thu, 20 Mar 2008 09:07:03 +0100
+
inspircd (1.1.17+dfsg-1) unstable; urgency=low
[ Darren Blaber ]
Modified: packages/inspircd/trunk/debian/inspircd.init
URL: http://svn.debian.org/wsvn/pkg-irc/packages/inspircd/trunk/debian/inspircd.init?rev=190&op=diff
==============================================================================
--- packages/inspircd/trunk/debian/inspircd.init (original)
+++ packages/inspircd/trunk/debian/inspircd.init Thu Mar 20 08:08:30 2008
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
### BEGIN INIT INFO
# Provides: inspircd
# Required-Start: $network $syslog $time
@@ -17,6 +17,7 @@
IRCDLOG="/var/log/inspircd.log"
IRCDARGS="--logfile $IRCDLOG"
USER="irc"
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
if [ -f "/etc/default/inspircd" ]; then
. /etc/default/inspircd
@@ -28,24 +29,24 @@
IRCDPIDN=`cat "$IRCDPID" 2> /dev/null`
fi
-function start_ircd()
+start_ircd()
{
- touch "$IRCDPID"
- chown "$USER" "$IRCDPID"
- touch "$IRCDLOG"
- chown "$USER" "$IRCDLOG"
+# touch "$IRCDPID"
+# chown "$USER" "$IRCDPID"
+# touch "$IRCDLOG"
+# chown "$USER" "$IRCDLOG"
export LD_LIBRARY_PATH=/usr/lib/inspircd
start-stop-daemon --start --quiet --oknodo --chuid "$USER" --pidfile "$IRCDPID" --exec "$IRCD" -- $IRCDARGS start > /dev/null
}
-function stop_ircd()
+stop_ircd()
{
start-stop-daemon --stop --quiet --pidfile "$IRCDPID" > /dev/null 2> /dev/null
rm -f "$IRCDPID"
return 0
}
-function reload_ircd()
+reload_ircd()
{
if [ ! -z "$IRCDPIDN" ] && kill -0 $IRCDPIDN 2> /dev/null; then
kill -HUP $IRCDPIDN >/dev/null 2>&1 || return 1
@@ -64,7 +65,6 @@
fi
echo -n "Starting Inspircd... "
start_ircd && echo "done."
- sleep 1s
;;
stop)
echo -n "Stopping Inspircd... "
@@ -79,10 +79,13 @@
sleep 2s
$0 start
;;
+ cron)
+ start_ircd || echo "Inspircd not running, starting it"
+ ;;
+
*)
- echo "Usage: $0 {start|stop|restart|reload|force-reload}"
+ echo "Usage: $0 {start|stop|restart|reload|force-reload|cron}"
exit 1
esac
-exit $RETVAL
More information about the Pkg-irc-commits
mailing list