]> mj.ucw.cz Git - nwho.git/commitdiff
More work on bringing the Debian packaging up to date
authorMartin Mares <mj@ucw.cz>
Fri, 31 Dec 2010 16:43:03 +0000 (17:43 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 31 Dec 2010 16:43:03 +0000 (17:43 +0100)
Revived default file and init script which got lost in the process
of repository conversions somehow.

debian/copyright
debian/nwho.default [new file with mode: 0644]
debian/nwho.init [new file with mode: 0755]
debian/rules

index 4e28a037ebaab142fa8bfa26a40e392b0fab0a00..bea915f1f8758766d2d4bd1c2478f3073cc247f4 100644 (file)
@@ -1,5 +1,5 @@
 NWho -- rwho/rwhod replacement
-Copyright (c) 1996--2001 Martin Mares <mj@ucw.cz>
+Copyright (c) 1996--2010 Martin Mares <mj@ucw.cz>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -11,7 +11,5 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with this program in the file /usr/doc/copyright/GPL.  If not,
-write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
-MA 02139, USA.
+A full copy of the GNU GPL can be found in /usr/share/common-licenses on
+Debian systems.
diff --git a/debian/nwho.default b/debian/nwho.default
new file mode 100644 (file)
index 0000000..119966a
--- /dev/null
@@ -0,0 +1,5 @@
+# If you want to send your nwho information to another server, set
+# its name here. If you want to gather information from the others,
+# leave it commented out.
+
+#NWHOSERVER=server.name
diff --git a/debian/nwho.init b/debian/nwho.init
new file mode 100755 (executable)
index 0000000..6c3e951
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Start/stop the nwho daemon.
+
+### BEGIN INIT INFO
+# Provides:          nwho
+# Required-Start:    $network $local_fs
+# Required-Stop:     $network $local_fs
+# Default-Start:     S 2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: The network who daemon
+# Description:       This is Yet Another RWho Replacement utility. It collects information
+#                   about all logged in users on a central server where it can be displayed.
+### END INIT INFO
+
+test -f /usr/sbin/nwhod || exit 0
+
+if [ -f /etc/default/nwho ] ; then
+       . /etc/default/nwho
+fi
+
+case "$1" in
+start) echo -n "Starting network who daemon: nwhod"
+        start-stop-daemon --start --quiet --exec /usr/sbin/nwhod $NWHOSERVER
+        echo "."
+       ;;
+stop)  echo -n "Stopping network who daemon: nwhod"
+        start-stop-daemon --stop --quiet --exec /usr/sbin/nwhod
+       [ -z "$NWHOSERVER" ] && rm -f /var/state/nwho/*
+        echo "."
+        ;;
+restart|reload|force-reload) echo -n "Restarting network who daemon: nwhod"
+        start-stop-daemon --stop --quiet --exec /usr/sbin/nwhod
+        start-stop-daemon --start --quiet --exec /usr/sbin/nwhod $NWHOSERVER
+        echo "."
+        ;;
+*)     echo "Usage: /etc/init.d/nwho start|stop|restart|reload|force-reload"
+        exit 1
+        ;;
+esac
+exit 0
index 55c441e880be8233b91c39bc9e2dad14b417abc1..bdc7361232e1b048d3b15ab023dd39ac508692de 100755 (executable)
@@ -29,8 +29,10 @@ binary-arch: build
        $(MAKE) ROOT=`pwd`/debian/nwho install
 
        dh_installchangelogs
+       dh_installdocs README
+       dh_installinit
        dh_strip
-#      dh_compress
+       dh_compress
        dh_fixperms
        dh_installdeb
        dh_shlibdeps