aboutsummaryrefslogtreecommitdiff
path: root/network/ddclient/rc.ddclient
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2011-09-03 09:18:14 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-04 21:56:28 -0300
commitec410d942c11c4cb2ef9b8a7c280f5b6736308ee (patch)
treee3f26414f6ef149e6c9d682f1da56d10fce1d81d /network/ddclient/rc.ddclient
parentcff22125fb701c976fa17fd24a0da15b10327e3d (diff)
network/ddclient: Updated for version 3.8.1.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/ddclient/rc.ddclient')
-rw-r--r--network/ddclient/rc.ddclient43
1 files changed, 43 insertions, 0 deletions
diff --git a/network/ddclient/rc.ddclient b/network/ddclient/rc.ddclient
new file mode 100644
index 0000000000000..cb88a8dd261f1
--- /dev/null
+++ b/network/ddclient/rc.ddclient
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# ddclient This shell script takes care of starting and stopping
+# ddclient.
+#
+# ddclient provides support for updating dynamic DNS services.
+
+[ -f /etc/ddclient/ddclient.conf ] || exit 1
+
+case "$1" in
+ start)
+ echo -n "Starting ddclient: "
+ ddclient
+ echo
+ ;;
+ stop)
+ echo -n "Shutting down ddclient: "
+ #kill $( ps -aef | grep ddclient | grep sleeping | awk '{print$2}' )
+ kill -9 $( cat /var/run/ddclient.pid )
+ echo
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ status)
+ pids=$( ps -aef | grep ddclient | grep sleeping | awk '{print$2}' )
+ if test "$pids"
+ then
+ for p in $pids
+ do
+ echo "ddclient (pid $p) is running."
+ done
+ else
+ echo "ddclient is stopped."
+ fi
+ ;;
+ *)
+ echo "Usage: ddclient {start|stop|restart|status}"
+ exit 1
+esac
+
+exit 0