-
Notifications
You must be signed in to change notification settings - Fork 0
/
noip2.sh
executable file
·48 lines (39 loc) · 1.11 KB
/
noip2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh
# /etc/init.d/noip2.sh
### BEGIN INIT INFO
# Provides: noip2
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: No-IP Dynamic DNS client
### END INIT INFO
# Supplied by no-ip.com
# Modified for Debian GNU/Linux by Eivind L. Rygge <[email protected]>
# corrected 1-17-2004 by Alex Docauer <[email protected]>
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc
DAEMON=/usr/local/bin/noip2
NAME=noip2
test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting dynamic address update: "
start-stop-daemon --start --exec $DAEMON
echo "noip2."
;;
stop)
echo -n "Shutting down dynamic address update:"
start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON
echo "noip2."
;;
restart)
echo -n "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