From 20599d2964286aa73897564350381bc7e7853564 Mon Sep 17 00:00:00 2001 From: Joshua Judson Rosen Date: Sat, 6 Dec 2014 18:54:15 -0500 Subject: [PATCH] stopdaemons.sh: pass site-specifier args through to getvaliddaemons.php --- scripts/stopdaemons.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/stopdaemons.sh b/scripts/stopdaemons.sh index 35841b64a8..ca2f4d1541 100755 --- a/scripts/stopdaemons.sh +++ b/scripts/stopdaemons.sh @@ -20,6 +20,7 @@ # This program tries to stop the daemons for GNU social that were # previously started by startdaemons.sh +ARGSG= SITENAME= SITE= ID="*" @@ -28,12 +29,17 @@ if [ $# -gt 0 ] ; then SITENAME="$1" SITE="-s$SITENAME" ID=`echo $SITENAME | sed s/\\\\./_/g` + ARGSG="$ARGSG -s$1" +fi + +if [ $# -gt 1 ]; then + ARGSG="$ARGSG -p$2" fi SDIR=`dirname $0` DIR=`php $SDIR/getpiddir.php $SITE` -DAEMONS=`php $SDIR/getvaliddaemons.php` +DAEMONS=`php $SDIR/getvaliddaemons.php $ARGSG` for f in $DAEMONS; do f=$(basename $f .php) -- 2.39.5