diff --git a/debian/control b/debian/control index e4f2e96..3074971 100644 --- a/debian/control +++ b/debian/control @@ -1,16 +1,16 @@ Source: msrprelay Section: net Priority: optional Maintainer: Dan Pascu Uploaders: Adrian Georgescu Build-Depends: debhelper (>= 9), python(>= 2.7) Standards-Version: 3.9.8 Package: msrprelay Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, python-application (>= 1.2.8), python-gnutls (>= 3.0.0), python-twisted-core (>= 2.5.0), python-twisted-names, python-sqlobject (>= 0.10.2) +Depends: ${python:Depends}, ${misc:Depends}, lsb-base, python-application (>= 1.2.8), python-gnutls (>= 3.0.0), python-twisted-core (>= 2.5.0), python-twisted-names, python-sqlobject (>= 0.10.2) Description: MSRP Relay, a RFC 4976 compatible IM/File transfer relay This software implements an MSRP relay, which is an extension to the MSRP protocol (RFC 4975). Its main role is to help NAT traversal of Interactive Messaging and file transfer sessions for SIP/MSRP endpoints located behind NAT. diff --git a/debian/msrprelay.init b/debian/msrprelay.init index 6d8ab98..1832074 100644 --- a/debian/msrprelay.init +++ b/debian/msrprelay.init @@ -1,74 +1,76 @@ #!/bin/sh # ### BEGIN INIT INFO # Provides: msrprelay # Required-Start: $syslog $network $local_fs $remote_fs $time # Required-Stop: $syslog $network $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the MSRP relay # Description: Start the MSRP relay ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin INSTALL_DIR="/usr/bin" RUNTIME_DIR="/var/run/msrprelay" SERVER="$INSTALL_DIR/msrprelay" PID="$RUNTIME_DIR/relay.pid" # Options for the MSRP Relay. Do not include --pid # --pid will be added automatically if needed. OPTIONS="" NAME="msrprelay" DESC="MSRP Relay" test -f $SERVER || exit 0 +. /lib/lsb/init-functions + if [ "$PID" != "/var/run/msrprelay/relay.pid" ]; then OPTIONS="--pid $PID $OPTIONS" fi start() { echo -n "Starting $DESC: $NAME" start-stop-daemon --start --quiet --pidfile $PID --exec $SERVER -- $OPTIONS echo "." } stop () { echo -n "Stopping $DESC: $NAME" start-stop-daemon --stop --quiet --oknodo --signal 15 --pidfile $PID echo "." } reload () { echo -n "Reloading $DESC: $NAME" start-stop-daemon --stop --quiet --oknodo --signal 1 --pidfile $PID echo "." } case "$1" in start) start ;; stop) stop ;; reload) reload ;; restart|force-reload) stop #sleep 1 start ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}" >&2 exit 1 ;; esac exit 0