network/geomyidae: Fix rc script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
David Woodfall 2017-11-26 08:30:55 +07:00 committed by Willy Sudiarto Raharjo
parent 992ce79a42
commit d0b12203a1
2 changed files with 8 additions and 7 deletions

View File

@ -23,7 +23,7 @@
PRGNAM=geomyidae
VERSION=${VERSION:-git20171114}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then

View File

@ -1,20 +1,21 @@
#!/bin/sh
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)