wok diff busybox/stuff/daemon @ rev 25620
Up youtube-dl (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 30 10:53:19 2023 +0000 (14 months ago) |
parents | ff5fd8788cd9 |
children |
line diff
1.1 --- a/busybox/stuff/daemon Fri May 27 01:40:23 2016 +0300 1.2 +++ b/busybox/stuff/daemon Wed Aug 30 10:53:19 2023 +0000 1.3 @@ -54,7 +54,8 @@ 1.4 fi 1.5 action 'Starting %s: %s...' "$DESC" $NAME 1.6 $DAEMON $OPTIONS 1.7 - [ -f $PIDFILE ] || pidof $NAME | awk '{print $1}' > $PIDFILE 1.8 + [ -f $PIDFILE ] || 1.9 + ps x | sed "/$NAME/!d;/sed/d;/etc\\/init/d" | awk '{ print $1 }' > $PIDFILE 1.10 active_pidfile $PIDFILE $NAME 1.11 status 1.12 ;; 1.13 @@ -78,7 +79,8 @@ 1.14 kill $(cat $PIDFILE) 1.15 sleep 2 1.16 $DAEMON $OPTIONS 1.17 - [ -f $PIDFILE ] || pidof $NAME | awk '{print $1}' > $PIDFILE 1.18 + [ -f $PIDFILE ] || 1.19 + ps x | sed "/$NAME/!d;/sed/d;/etc\\/init/d" | awk '{ print $1 }' > $PIDFILE 1.20 active_pidfile $PIDFILE $NAME 1.21 status 1.22 ;;