Update Slackware startup script: rc.geomyidae - geomyidae - A small C-based gopherd. HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit b5deb9c4f2c6c495d553fa22bd16e743848e2de6 DIR parent 8a45db6e405745c2787614b7a741655f0889e66f HTML Author: Slackhead <slackhead@gmail.com> Date: Sat, 25 Nov 2017 18:00:12 +0000 Update Slackware startup script: rc.geomyidae Signed-off-by: Christoph Lohmann <20h@r-36.net> Diffstat: M rc.d/rc.geomyidae | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) --- DIR diff --git a/rc.d/rc.geomyidae b/rc.d/rc.geomyidae @@ -1,23 +1,21 @@ #!/bin/sh -# rc file for Slackware Linux. -# This lives in /ect/rc.d/ - -PID=$(pidof -o %PPID /usr/bin/geomyidae) +# Array of all PIDS +PID=($(pidof -o %PPID /usr/bin/geomyidae)) case "$1" in start) echo "Starting geomyidae" - [ -z "$PID" ] && /usr/bin/geomyidae $GEOMYIDAE_ARGS 2>&1 + /usr/bin/geomyidae $GEOMYIDAE_ARGS 2>&1 if [ $? -gt 0 ]; then echo "Startup failed" fi ;; stop) - echo "Stopping geomyidae" - [ -n "$PID" ] && kill $PID &>/dev/null - if [ $? -gt 0 ]; then - echo "Stopping failed" + echo "Stopping all geomyidae processes" + [ -n "$PID" ] && kill ${PID[@]} &>/dev/null + if [ $? -gt 0 ] && [ -n "$PID" ]; then + echo "Stopping failed for at least one process" fi ;; restart)