Last active
August 29, 2017 01:33
-
-
Save whoamiTM/aaf4797cff92c2366a3a618df37080fc to your computer and use it in GitHub Desktop.
noip2 for debian /etc/init.d/noip2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: noip2 | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Start noip2 at boot time | |
# Processname: noip2 | |
### END INIT INFO | |
# /etc/init.d/noip2 | |
DAEMON=/usr/local/bin/noip2 | |
NAME=noip2 | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
echo "Starting dynamic address update" | |
start-stop-daemon --start --exec $DAEMON | |
echo "noip2" | |
;; | |
stop) | |
echo "Stopping dynamic address update" | |
start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON | |
echo "noip2" | |
;; | |
restart) | |
echo "Restarting dynamic address update" | |
start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON | |
start-stop-daemon --start --exec $DAEMON | |
echo "noip2" | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment