# HG changeset patch # User Markus Bröker # Date 1229179335 -3600 # Node ID 767f79e69de151e91c497838f2099349516f6875 # Parent a0fad312ea3034623bd53e91848d667aa22e3584 Debian QoS - Lintian Checks committer: Markus Bröker diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mcbot (0.96-1) unstable; urgency=low +mcbot (0.96-2) unstable; urgency=low * Initial Release * the location of mcbot.cgi is stored in the db @@ -7,7 +7,8 @@ * Locale Settings changed to C * freenode connect fix * stream handling for freebsd - * Debian Policy: Assume everything is working and start the service via default + * Debian Policy: Assume everything is working and start the + service via default * irc_login connects now to the proper (non-freenode.net) server * privmsgs will be send to the proper location... * A simple garbage collector prevents memory leaks... @@ -25,5 +26,6 @@ * build timestamp added * mcbot.cgi installation defaults to /usr/lib/cgi-bin * Build Dependency Check improved. + * Lintian Build Checks - -- Markus Broeker Sun, 24 Aug 2008 11:17:01 +0200 + -- Markus Broeker Sun, 24 Aug 2008 20:30:00 +0200 diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -8,5 +8,5 @@ Package: mcbot Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: mcbot is an irc bot - mcbot is a small irc bot with a factoids database. +Description: A very small irc bot + mcbot is a very small irc bot with a factoids database. diff --git a/debian/postinst b/debian/postinst --- a/debian/postinst +++ b/debian/postinst @@ -38,7 +38,8 @@ echo "Setting permissions for /var/lib/nobody/.mcbotrc to 600" chmod 600 /var/lib/nobody/.mcbotrc echo "ENTER /etc/init.d/mcbot restart after editing .mcbotrc" - /etc/init.d/mcbot restart + update-rc.d mcbot defaults &>/dev/null + invoke-rc.d mcbot restart ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/postrm b/debian/postrm --- a/debian/postrm +++ b/debian/postrm @@ -24,10 +24,10 @@ rm -rf /var/lib/nobody/data; rm -f /var/lib/nobody/.mcbotrc; rm -f /var/lib/nobody/mcbot-*.log; - usermod -d /nonexistent -s /bin/bash nobody ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + update-rc.d -f mcbot remove &>/dev/null usermod -d /nonexistent -s /bin/bash nobody ;; diff --git a/debian/preinst b/debian/preinst --- a/debian/preinst +++ b/debian/preinst @@ -18,7 +18,7 @@ install|upgrade) if [ -x /etc/init.d/mcbot ]; then - /etc/init.d/mcbot stop; + invoke-rc.d mcbot stop; fi if [ -f /var/lib/nobody/.mcbotrc ]; diff --git a/scripts/runbot b/scripts/runbot --- a/scripts/runbot +++ b/scripts/runbot @@ -1,7 +1,17 @@ #!/bin/sh +### BEGIN INIT INFO +# Provides: mcbot +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: IRC BOT mcbot +# Description: IRC BOT mcbot +### END INIT INFO + BINARY="mcbot" -DIRECTORY="/usr/local/sbin/" +DIRECTORY="/usr/sbin/" LANGUAGE="de_DE.UTF-8" [[ ! -x "${DIRECTORY}/${BINARY}" ]] && exit 0 @@ -48,8 +58,14 @@ stop start ;; + force-reload) + echo "Force reload stub" + stop + start + ;; + *) - echo "Usage: start|stop|restart|status" + echo "Usage: start|stop|restart|status|force-reload" ;; esac diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,8 +20,8 @@ ADD_EXECUTABLE(dbtool database.c dbtool.c) # Install Rules -INSTALL(TARGETS mcbot RUNTIME DESTINATION sbin) -INSTALL(TARGETS dbtool RUNTIME DESTINATION bin) +INSTALL(TARGETS mcbot RUNTIME DESTINATION /usr/sbin) +INSTALL(TARGETS dbtool RUNTIME DESTINATION /usr/bin) INSTALL(DIRECTORY ../locale/ DESTINATION /var/lib/nobody/data/locale) INSTALL(PROGRAMS ../scripts/runbot DESTINATION /etc/init.d/ RENAME mcbot)