--- init.d_inspircd 2007-07-11 12:37:33.000000000 +0400 +++ inspircd-initd 2007-11-11 15:37:33.489224352 +0300 @@ -1,31 +1,37 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/inspircd/files/init.d_inspircd,v 1.3 2007/07/11 08:10:47 hansmi Exp $ +# $Header: $ -opts="${opts} rehash" +opts="${opts} rehash version" depend() { need net - provide ircd + provide ircd } start() { ebegin "Starting InspIRCd" start-stop-daemon --start --quiet --chuid inspircd \ - --exec /usr/bin/inspircd -- \ - --logfile /var/log/inspircd/ircd.log &>/dev/null + --exec /usr/bin/inspircd -- \ + --logfile /var/log/inspircd/ircd.log &> /dev/null eend $? } stop() { ebegin "Stopping InspIRCd" - start-stop-daemon --stop --quiet --pidfile /var/run/inspircd/ircd.pid + start-stop-daemon --stop --quiet --exec /usr/bin/inspircd eend $? } rehash() { ebegin "Rehashing InspIRCd" - kill -s SIGHUP $( /dev/null + eend $? +} + +version() { + ebegin "Retrieve InspIRCd version" + /usr/lib/inspircd/inspircd.launcher/inspircd version eend $? }