X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fstopdaemons.sh;h=b4a3725d8dcfba215f1785c87e001b0b82879309;hb=77d1a680b12a7d301c2144e547fb0cfaa03054e5;hp=45a7d5cc8b6cc1055a17354ab197549c4e78b42c;hpb=f79aec36feaa4760201a7e88d5b31513a3c458ba;p=quix0rs-gnu-social.git diff --git a/scripts/stopdaemons.sh b/scripts/stopdaemons.sh index 45a7d5cc8b..b4a3725d8d 100755 --- a/scripts/stopdaemons.sh +++ b/scripts/stopdaemons.sh @@ -17,17 +17,29 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# This program tries to stop the daemons for StatusNet that were +# This program tries to stop the daemons for GNU social that were # previously started by startdaemons.sh +SITENAME= +SITE= +ID="*" + +if [ $# -gt 0 ] ; then + SITENAME="$1" + SITE="-s$SITENAME" + ID=`echo $SITENAME | sed s/\\\\./_/g` +fi + SDIR=`dirname $0` -DIR=`php $SDIR/getpiddir.php` +DIR=`$SDIR/getpiddir.php $SITE` + +DAEMONS=`$SDIR/getvaliddaemons.php` -for f in ombhandler smshandler pinghandler queuedaemon \ - twitterhandler facebookhandler imdaemon \ - twitterstatusfetcher synctwitterfriends pluginhandler rsscloudhandler; do +for f in $DAEMONS; do + f=$(basename $f .php) + + FILES="$DIR/$f.$ID.pid" - FILES="$DIR/$f.*.pid" for ff in "$FILES" ; do PID=`cat $ff 2>/dev/null` @@ -52,4 +64,3 @@ for f in ombhandler smshandler pinghandler queuedaemon \ rm -f $ff done done -