wok-6.x diff busybox/stuff/daemon @ rev 24765

afpfs-ng,btfs,curlftpfs,ddumbfs,djmount,encfs,exfat-utils,fusecloop,fusedav,fuseiso,httpfs2-fuse: try fuse2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 18 17:45:47 2022 +0000 (2022-03-18)
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	Fri Mar 18 17:45:47 2022 +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      ;;