summaryrefslogtreecommitdiff
path: root/network/ddclient/rc.ddclient.new
diff options
context:
space:
mode:
authorIskar Enev <iskar.enev[@]gmail.com>2010-05-11 20:01:30 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 20:01:30 +0200
commitc5b8f0a5d9694132063cc3ea5a407a2fe65ba10c (patch)
tree4a816a5fe870a7bf9808eab5840043e2c4a30cae /network/ddclient/rc.ddclient.new
parent0513e01a00b4bc30f53f03a8a96a7570b63c8d1a (diff)
downloadslackbuilds-c5b8f0a5d9694132063cc3ea5a407a2fe65ba10c.tar.gz
network/ddclient: Added to 12.0 repository
Diffstat (limited to 'network/ddclient/rc.ddclient.new')
-rw-r--r--network/ddclient/rc.ddclient.new43
1 files changed, 43 insertions, 0 deletions
diff --git a/network/ddclient/rc.ddclient.new b/network/ddclient/rc.ddclient.new
new file mode 100644
index 0000000000..cb88a8dd26
--- /dev/null
+++ b/network/ddclient/rc.ddclient.new
@@ -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