mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-01 01:13:29 +08:00
8ac6a2f94c
inadyn is a DynamicDNS client/updater which works with dyndns.com, noip.com and many other DDNS providers. It is minimal in footprint and requirements, supports IP caching, multiple providers, multiple domain names, and a variety of other situations. [Peter: fixup whitespace / trailing spaces] Signed-off-by: Dave Purdy <david.c.purdy@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
36 lines
864 B
Bash
36 lines
864 B
Bash
#!/bin/sh
|
|
#
|
|
# Start & stop the inadyn client
|
|
#
|
|
|
|
CONFIG=/etc/inadyn.conf
|
|
VR_INADYN=/var/run/inadyn
|
|
|
|
# check if CONFIG exists, print message & exit if it doesn't
|
|
[ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 )
|
|
|
|
# check if VR_INADYN exists, create it if not
|
|
[ ! -d $VR_INADYN ] && mkdir -p $VR_INADYN
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "Starting inadyn."
|
|
start-stop-daemon -S -x /usr/sbin/inadyn
|
|
;;
|
|
stop)
|
|
echo "Stopping inadyn."
|
|
start-stop-daemon -q -K -x /usr/sbin/inadyn
|
|
rm -f /var/run/inadyn/inadyn.pid
|
|
;;
|
|
restart)
|
|
"$0" stop
|
|
"$0" start
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|
|
|