From 3d4f743ed6d3f20af6fab39ff8d8018427782a5c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 25 Sep 2022 16:57:16 +0100 Subject: [PATCH] init script: Abolish old copy Signed-off-by: Ian Jackson --- old-python/debian/hippotat.hippotatd.init | 118 ---------------------- 1 file changed, 118 deletions(-) delete mode 100644 old-python/debian/hippotat.hippotatd.init diff --git a/old-python/debian/hippotat.hippotatd.init b/old-python/debian/hippotat.hippotatd.init deleted file mode 100644 index c8b3dc2..0000000 --- a/old-python/debian/hippotat.hippotatd.init +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh - -### BEGIN INIT INFO -# Provides: hippotatd -# Required-Start: $syslog $network userv -# Required-Stop: $syslog $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: hippotatd -# Description: Asinine IP over HTTP server -### END INIT INFO - -DAEMON=/usr/sbin/hippotatd -MASTER_CONFIG=/etc/hippotat/master.cfg -USER=Debian-hippotat -PIDFILE=/var/run/hippotat/hippotatd.pid -LOGFACILITY=daemon -CHECK_FIREWALL=true -# HIPPOTATD_ARGS -AS_USER=as_user_userv -DESCRIPTION='Asinine IP over HTTP server' -if type authbind >/dev/null 2>&1; then AUTHBIND=authbind; fi - -test -e /etc/default/hippotatd && -. /etc/default/hippotatd - -set -e - -test -f $DAEMON || exit 0 -egrep '^[^ #]' $MASTER_CONFIG >/dev/null 2>&1 || exit 0 - -. /lib/lsb/init-functions - -as_user_userv () { - userv --override ' - execute-from-path - no-suppress-args - ' $USER "$@" -} - -ssd () { - set +e - start-stop-daemon --quiet --user $USER --pidfile=$PIDFILE "$@" - rc=$? - set -e -} -ensure_dirs () { - pidfiledir=${PIDFILE%/*} - if test -d ${pidfiledir}; then return; fi - mkdir -m 755 $pidfiledir - chown $USER $pidfiledir -} - -dump_firewall () { - iptables -L -v -n -} - -print_config () { - $AS_USER $DAEMON $HIPPOTATD_ARGS --print-config "$1" -} - -check_firewall () { - vnetwork=$(print_config vnetwork) - if dump_firewall | fgrep " $vnetwork " >/dev/null; then :; else - log_failure_msg \ - "no entry in firewall for insecure vnetwork $vnetwork" - exit 1 - fi -} - -do_start () { - check_firewall - ensure_dirs - ssd --chuid $USER --start \ - --startas /bin/sh -- -ec '"$@"' x \ - $AUTHBIND $DAEMON --daemon --pidfile=$PIDFILE \ - --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS -} -do_stop () { - ssd --stop --oknodo --retry 5 -} - -case "$1" in -start) - log_daemon_msg "Starting $DESCRIPTION" hippotatd - do_start - log_end_msg $rc - exit $rc - ;; - -stop) - log_daemon_msg "Stopping $DESCRIPTION" hippotatd - do_stop - log_end_msg $rc - exit $rc - ;; - -restart|force-reload) - log_daemon_msg "Restarting $DESCRIPTION" hippotatd - do_stop - sleep 1 - do_start - log_end_msg $rc - ;; - -reload) - log_failure_msg "Cannot reload hippotat - need restart" - exit 1 - ;; - -*) - echo >&2 "$0: unknown action $1" - exit 1 - ;; - -esac - -exit 0 -- 2.30.2