Debian QoS - Lintian Checks
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 15:42:15 +0100
changeset 26 767f79e69de1
parent 25 a0fad312ea30
child 27 4a2f7a1492ab
Debian QoS - Lintian Checks committer: Markus Bröker <mbroeker@largo.homelinux.org>
debian/changelog
debian/control
debian/postinst
debian/postrm
debian/preinst
scripts/runbot
src/CMakeLists.txt
--- 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 <mbroeker@largo.homelinux.org>  Sun, 24 Aug 2008 11:17:01 +0200
+ -- Markus Broeker <mbroeker@largo.homelinux.org>  Sun, 24 Aug 2008 20:30:00 +0200
--- 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.
--- 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)
--- 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
 	;;
 	
--- 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 ]; 
--- 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
 
--- 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)