Browse Source

- init-scripts: re-add flag-check to stop functions to avoid errors in log

master
vanhofen 7 years ago
parent
commit
a4d060446a
  1. 4
      archive-imagefiles/scripts/djmount.init
  2. 6
      archive-imagefiles/scripts/dropbear.init
  3. 6
      archive-imagefiles/scripts/inadyn.init
  4. 4
      archive-imagefiles/scripts/nfsd.init
  5. 20
      archive-imagefiles/scripts/samba3.init
  6. 8
      archive-imagefiles/scripts/tuxcald.init
  7. 8
      archive-imagefiles/scripts/tuxmaild.init
  8. 6
      archive-imagefiles/scripts/ushare.init
  9. 4
      archive-imagefiles/scripts/xupnpd.init
  10. 6
      skel-root/axtech/ax/etc/init.d/crond
  11. 2
      skel-root/axtech/ax/etc/init.d/networking
  12. 6
      skel-root/coolstream/hd1/etc/init.d/crond
  13. 6
      skel-root/coolstream/hd2/etc/init.d/crond
  14. 2
      skel-root/coolstream/hd2/etc/init.d/networking

4
archive-imagefiles/scripts/djmount.init

@ -11,7 +11,9 @@ case $1 in
fi
;;
stop)
fusermount -u /media/upnp
if [ -e /var/etc/.djmount ]; then
fusermount -u /media/upnp
fi
;;
restart)
if [ -e /var/etc/.djmount ]; then

6
archive-imagefiles/scripts/dropbear.init

@ -29,8 +29,10 @@ case $1 in
fi
;;
stop)
pid=$(cat /var/run/dropbear.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
if [ -e /var/etc/.dropbear ]; then
pid=$(cat /var/run/dropbear.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
fi
;;
*)
echo "[${BASENAME}] Usage: $0 {start|stop}"

6
archive-imagefiles/scripts/inadyn.init

@ -9,8 +9,10 @@ case $1 in
fi
;;
stop)
pid=$(cat /var/run/inadyn.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
if [ -e /var/etc/.inadyn ]; then
pid=$(cat /var/run/inadyn.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
fi
;;
*)
echo "[${BASENAME}] Usage: $0 {start|restart|stop}"

4
archive-imagefiles/scripts/nfsd.init

@ -53,7 +53,9 @@ case "$1" in
fi
;;
stop)
stop
if [ -e /var/etc/.nfsd ]; then
stop
fi
;;
restart)
if [ -e /var/etc/.nfsd ]; then

20
archive-imagefiles/scripts/samba3.init

@ -25,15 +25,17 @@ case "$1" in
fi
;;
stop)
for i in nmbd smbd; do
printf "stopping $i ..."
if pidof $i > /dev/null; then
read pid < /var/run/${i}.pid
kill $pid && echo "done" || echo "failed!?"
else
echo "not running"
fi
done
if [ -e /var/etc/.samba ]; then
for i in nmbd smbd; do
printf "stopping $i ..."
if pidof $i > /dev/null; then
read pid < /var/run/${i}.pid
kill $pid && echo "done" || echo "failed!?"
else
echo "not running"
fi
done
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

8
archive-imagefiles/scripts/tuxcald.init

@ -10,9 +10,11 @@ case $1 in
fi
;;
stop)
SHOWINFO "stopping ..."
pid=$(cat /var/run/tuxcald.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
if [ -e /var/etc/.tuxcald ]; then
SHOWINFO "stopping ..."
pid=$(cat /var/run/tuxcald.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

8
archive-imagefiles/scripts/tuxmaild.init

@ -11,9 +11,11 @@ case $1 in
fi
;;
stop)
SHOWINFO "stopping ..."
pid=$(cat /var/run/tuxmail.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
if [ -e /var/etc/.tuxmaild ]; then
SHOWINFO "stopping ..."
pid=$(cat /var/run/tuxmail.pid 2>/dev/null)
test -n "$pid" && kill $pid || true
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

6
archive-imagefiles/scripts/ushare.init

@ -9,8 +9,10 @@ case $1 in
fi
;;
stop)
trap "" INT
kill -INT $(pidof ushare)
if [ -e /var/etc/.ushare ]; then
trap "" INT
kill -INT $(pidof ushare)
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

4
archive-imagefiles/scripts/xupnpd.init

@ -12,7 +12,9 @@ case $1 in
fi
;;
stop)
killall xupnpd
if [ -e /var/etc/.xupnpd ]; then
killall xupnpd
fi
;;
restart)
if [ -e /var/etc/.xupnpd ]; then

6
skel-root/axtech/ax/etc/init.d/crond

@ -9,8 +9,10 @@ case $1 in
fi
;;
stop)
trap "" INT
kill -INT $(pidof crond)
if [ -e /var/etc/.crond ]; then
trap "" INT
kill -INT $(pidof crond)
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

2
skel-root/axtech/ax/etc/init.d/networking

@ -8,7 +8,7 @@ case "$1" in
ifup -a
;;
stop)
SOWINFO "Deconfiguring network ... "
SHOWINFO "Deconfiguring network ... "
ifdown -a
;;
force-reload|restart)

6
skel-root/coolstream/hd1/etc/init.d/crond

@ -9,8 +9,10 @@ case $1 in
fi
;;
stop)
trap "" INT
kill -INT $(pidof crond)
if [ -e /var/etc/.crond ]; then
trap "" INT
kill -INT $(pidof crond)
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

6
skel-root/coolstream/hd2/etc/init.d/crond

@ -9,8 +9,10 @@ case $1 in
fi
;;
stop)
trap "" INT
kill -INT $(pidof crond)
if [ -e /var/etc/.crond ]; then
trap "" INT
kill -INT $(pidof crond)
fi
;;
*)
echo "[$BASENAME] Usage: $0 {start|stop}"

2
skel-root/coolstream/hd2/etc/init.d/networking

@ -8,7 +8,7 @@ case "$1" in
ifup -a
;;
stop)
SOWINFO "Deconfiguring network ... "
SHOWINFO "Deconfiguring network ... "
ifdown -a
;;
force-reload|restart)

Loading…
Cancel
Save