/etc/init.d/ez-ipupdate is in ez-ipupdate 3.0.11b8-13.4.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | #! /bin/sh
### BEGIN INIT INFO
# Provides: ez-ipupdate
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ez-ipupdate client for dynamic DNS services
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/ez-ipupdate
NAME=ez-ipupdate
DESC="Dynamic DNS client"
test -f "$DAEMON" || exit 0
set -e
# Create the directory where the PID file will be stored
if [ ! -d "/var/run/$NAME" ]; then
mkdir -p "/var/run/$NAME"
chown ez-ipupd "/var/run/$NAME"
fi
case "$1" in
start)
echo -n "Starting $DESC:"
configs=`find "/etc/$NAME/" -name '*.conf' | \
sed -e 's,.*/\(.*\).conf,\1,'`
if [ x"$configs" = x ]
then
echo " no .conf file in /etc/$NAME."
exit 0
fi
echo -n " $NAME"
for config in `echo "$configs"`
do
# Don't run configurations that are not daemons
if ! grep -q '^ *daemon' "/etc/$NAME/$config.conf"; then continue; fi
# Don't run configurations that run in the foreground
if grep -q '^ *foreground' "/etc/$NAME/$config.conf"; then continue; fi
# Ok, launch an ez-ipupdate instance
if start-stop-daemon --start --quiet \
--pidfile "/var/run/$NAME/$config.pid" \
--exec "$DAEMON" \
-- -d -c "/etc/$NAME/$config.conf" \
-F "/var/run/$NAME/$config.pid"
then
echo -n " $config"
fi
done
echo "."
;;
stop)
echo -n "Stopping $DESC:"
pidfiles=`find "/var/run/$NAME/" -name "*.pid" | \
sed -e 's,.*/\(.*\).pid,\1,'`
if [ x"$pidfiles" = x ]
then
echo " no $NAME running."
exit 0
fi
echo -n " $NAME"
for pidfile in `echo "$pidfiles"`
do
if start-stop-daemon --stop --signal 3 --quiet \
--pidfile "/var/run/$NAME/$pidfile.pid"
then
echo -n " $pidfile"
fi
done
echo "."
;;
reload)
echo -n "Reloading $DESC configuration files:"
pidfiles=`find "/var/run/$NAME" -name "*.pid" | \
sed -e 's,.*/\(.*\).pid,\1,'`
if [ x"$pidfiles" = x ]
then
echo " no $NAME running."
exit 0
fi
echo -n " $NAME"
for pidfile in `echo "$pidfiles"`
do
if start-stop-daemon --stop --signal 1 --quiet \
--pidfile "/var/run/$NAME/$pidfile.pid"
then
echo -n " $pidfile"
fi
done
echo "."
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
N="/etc/init.d/$NAME"
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
|