packaging fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Apr 2017 22:43:56 +0000 (23:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Apr 2017 22:43:56 +0000 (23:43 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/hippotat.hippotatd.init
debian/rules
hippotat
hippotatd

index ac91e3a..fbee31f 100644 (file)
@@ -10,7 +10,7 @@
 # Description:          Asinine IP over HTTP server
 ### END INIT INFO
 
-DAEMON=/usr/sbin/hippotat
+DAEMON=/usr/sbin/hippotatd
 MASTER_CONFIG=/etc/hippotat/master.cfg
 USER=Debian-hippotat
 PIDFILE=/var/run/hippotat/hippotatd.pid
@@ -40,7 +40,7 @@ as_user_userv () {
 
 ssd () {
        set +e
-       start-stop-daemon --start --quiet --user $USER --pidfile=$PIDFILE "$@"
+       start-stop-daemon --quiet --user $USER --pidfile=$PIDFILE "$@"
        rc=$?
        set -e
 }
@@ -71,12 +71,12 @@ check_firewall () {
 do_start () {
        check_firewall
        ensure_dirs
-       ssd     --chuid $USER --startas                         \
+       ssd     --chuid $USER --start --startas                 \
                $AUTHBIND $DAEMON --daemon --pidfile=$PIDFILE   \
                --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
 }
 do_stop () {
-       ssd     --stop --retry 5
+       ssd     --stop --oknodo --retry 5
 }
 
 case "$1" in
index 375d057..945367f 100755 (executable)
@@ -12,6 +12,13 @@ i=debian/hippotat
 debian/copyright: COPYING AGPLv3+CAFv2
        cat $^ >$@.tmp && mv -f $@.tmp $@
 
+override_dh_python3:
+       dh_python3 -O--buildsystem=pybuild
+       dh_installdirs /usr/sbin
+       mv $i/usr/{bin,sbin}/hippotatd
+
+#install -m755 -o0 -g0 -d $i//usr/sbin
+
 override_dh_installinit:
        dh_installinit --name=hippotatd
 
index 43faf28..96a3f21 100755 (executable)
--- a/hippotat
+++ b/hippotat
@@ -21,7 +21,7 @@
 #    along with this program, in the file GPLv3.  If not,
 #    see <http://www.gnu.org/licenses/>.
 
-#@ sys.path.append('@PYBUILD_INSTALL_DIR@')
+#@ import sys; sys.path.append('@PYBUILD_INSTALL_DIR@')
 from hippotatlib import *
 
 import twisted.web
index 1865dad..bc55650 100755 (executable)
--- a/hippotatd
+++ b/hippotatd
@@ -25,7 +25,7 @@
 #    the file AGPLv3+CAFv2.  If not, email Ian Jackson
 #    <ijackson@chiark.greenend.org.uk>.
 
-#@ sys.path.append(@PYBUILD_INSTALL_DIR@)
+#@ import sys; sys.path.append('@PYBUILD_INSTALL_DIR@')
 from hippotatlib import *
 
 import os
@@ -38,7 +38,6 @@ import twisted.internet
 from twisted.web.server import NOT_DONE_YET
 
 import twisted.web.static
-import twisted.python.syslog
 
 import hippotatlib.ownsource
 from hippotatlib.ownsource import SourceShipmentPreparer