Accepting request 175891 from home:seife:branches:network
more init-script fixes, sorry, should have run more tests :-) OBS-URL: https://build.opensuse.org/request/show/175891 OBS-URL: https://build.opensuse.org/package/show/network/ddclient?expand=0&rev=25
This commit is contained in:
parent
39544acbe1
commit
70e247b54c
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 16 13:23:40 UTC 2013 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
- more init-script fixes:
|
||||||
|
- startproc now needs the pidfile parameter (or it woulld look
|
||||||
|
for "perl.pid". Sorry, should have run more tests.
|
||||||
|
- while I'm at it, get the pidfile from the config file in case
|
||||||
|
the user would have changed it
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 15 07:58:26 UTC 2013 - seife+obs@b1-systems.com
|
Wed May 15 07:58:26 UTC 2013 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
10
rc.ddclient
10
rc.ddclient
@ -42,6 +42,10 @@ if [ `/bin/cat $DDCLIENT_CONFIG | grep -e "^use=" >/dev/null; echo $?` -eq 0 ];
|
|||||||
else
|
else
|
||||||
dd_use="-use=if -if ppp0"
|
dd_use="-use=if -if ppp0"
|
||||||
fi
|
fi
|
||||||
|
# extract pid= from config, strip trailing comments and trailing whitespace...
|
||||||
|
pid_file=`sed -n '/^pid=/{s@#.*$@@;s@[[:space:]]*$@@;s@^pid=@@;p}' /etc/ddclient.conf`
|
||||||
|
# default is /var/run/ddclient.pid
|
||||||
|
[ -z "$pid_file" ] && pid_file=/var/run/ddclient.pid
|
||||||
|
|
||||||
# Shell functions sourced from /etc/rc.status:
|
# Shell functions sourced from /etc/rc.status:
|
||||||
# rc_check check and set local and overall rc status
|
# rc_check check and set local and overall rc status
|
||||||
@ -77,14 +81,14 @@ case "$1" in
|
|||||||
echo -n "Starting ddclient daemon :"
|
echo -n "Starting ddclient daemon :"
|
||||||
# startproc does check the name of the binary, and this is "perl" in this case,
|
# startproc does check the name of the binary, and this is "perl" in this case,
|
||||||
# so better start it this way or systemd will not know it is running
|
# so better start it this way or systemd will not know it is running
|
||||||
/sbin/startproc /usr/bin/perl "$DDCLIENT_BIN" -daemon $dd_intervall "$dd_use" $DDCLIENT_OPTIONS -pid /var/run/ddclient.pid
|
/sbin/startproc -p $pid_file /usr/bin/perl "$DDCLIENT_BIN" -daemon $dd_intervall "$dd_use" $DDCLIENT_OPTIONS -pid $pid_file
|
||||||
|
|
||||||
# remember status and be verbose
|
# remember status and be verbose
|
||||||
rc_status -v
|
rc_status -v
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Shutting down ddclient daemon :"
|
echo -n "Shutting down ddclient daemon :"
|
||||||
/sbin/killproc -p /var/run/ddclient.pid -TERM /usr/bin/perl
|
/sbin/killproc -p $pid_file -TERM /usr/bin/perl
|
||||||
|
|
||||||
# remember status and be verbose
|
# remember status and be verbose
|
||||||
rc_status -v
|
rc_status -v
|
||||||
@ -117,7 +121,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
echo -n "Checking for service ddclient :"
|
echo -n "Checking for service ddclient :"
|
||||||
/sbin/checkproc -p /var/run/ddclient.pid /usr/bin/perl
|
/sbin/checkproc -p $pid_file /usr/bin/perl
|
||||||
|
|
||||||
# remember status and be verbose
|
# remember status and be verbose
|
||||||
rc_status -v
|
rc_status -v
|
||||||
|
Loading…
x
Reference in New Issue
Block a user