diff options
author | Kenneth Chan <kenneth.t.chan@gmail.com> | 2019-03-29 21:00:01 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-03-29 21:00:01 +0700 |
commit | 5d75e4d96e8cd87ef9341e14a368711ca8ca93b3 (patch) | |
tree | 788e4516a0c0247ee75ce3754082e188c5b4073a /network/inadyn/rc.inadyn | |
parent | df57cff0dd61b3eb570c1a89728f247f75d72143 (diff) | |
download | slackbuilds-5d75e4d96e8cd87ef9341e14a368711ca8ca93b3.tar.gz |
network/inadyn: Added (A Small and Simple DDNS Client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/inadyn/rc.inadyn')
-rw-r--r-- | network/inadyn/rc.inadyn | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/network/inadyn/rc.inadyn b/network/inadyn/rc.inadyn new file mode 100644 index 0000000000..381ac1b904 --- /dev/null +++ b/network/inadyn/rc.inadyn @@ -0,0 +1,49 @@ +#!/bin/sh +# +# rc.inadyn This shell script takes care of starting and stopping +# inadyn. +# +# inadyn provides support for updating dynamic DNS services. + +if [ ! -f /etc/inadyn.conf ]; then + echo "Missing .conf file" + echo "Exiting..." + exit 1 +fi + +PIDFILE=/var/run/inadyn.pid + +case "$1" in + start) + echo -n "Starting inadyn: /usr/sbin/inadyn" + /usr/sbin/inadyn + echo + ;; + stop) + echo -n "Stopping inadyn... " + kill $( ps ax | grep inadyn | grep Ss | awk '{print $1}' ) + #kill -9 $( cat $PIDFILE 2> /dev/null ) + echo + ;; + restart) + $0 stop + $0 start + ;; + status) + pids=$( ps ax | grep inadyn | grep Ss | awk '{print $1}' ) + if test "$pids" + then + for p in $pids + do + echo "inadyn (pid $p) is running." + done + else + echo "inadyn is not running." + fi + ;; + *) + echo "Usage: inadyn {start|stop|restart|status}" + exit 1 +esac + +exit 0 |