X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fstartdaemons.sh;h=5fb75414d33322292682c09b91b83c71205fb11d;hb=769e5b7622445cf49cbaf5a416fb6b250b072866;hp=8c054417de965b1077a6ba6c939699e1a11ef7a1;hpb=c4d67892751b17856b235182874c3304890dc2c3;p=quix0rs-gnu-social.git diff --git a/scripts/startdaemons.sh b/scripts/startdaemons.sh index 8c054417de..5fb75414d3 100755 --- a/scripts/startdaemons.sh +++ b/scripts/startdaemons.sh @@ -1,7 +1,8 @@ #!/bin/sh -# Laconica - a distributed open-source microblogging tool -# Copyright (C) 2008, Controlez-Vous, Inc. +# StatusNet - a distributed open-source microblogging tool + +# Copyright (C) 2008, 2009, StatusNet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -16,13 +17,30 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# This program tries to start the daemons for Laconica. Note that the 'maildaemon' needs to run as a mail filter. +# This program tries to start the daemons for StatusNet. +# Note that the 'maildaemon' needs to run as a mail filter. + +ARGSG= +ARGSD= + +if [ $# -gt 0 ]; then + ARGSG="$ARGSG -s$1" + ID=`echo $1 | sed s/\\\\./_/g` + ARGSD="$ARGSD -s$1 -i$ID" +fi + +if [ $# -gt 1 ]; then + ARGSD="$ARGSD -p$2" + ARGSG="$ARGSG -p$2" +fi + +DIR=`dirname $0` +DAEMONS=`php $DIR/getvaliddaemons.php $ARGSG` + +for f in $DAEMONS; do -export INSTALLDIR=$1 + printf "Starting $f..."; + php $f $ARGSD + printf "DONE.\n" -/sbin/start-stop-daemon -S --exec $INSTALLDIR/scripts/xmppdaemon.php -b -m --pidfile=/var/run/xmppdaemon.pid -/sbin/start-stop-daemon -S --exec $INSTALLDIR/scripts/xmppqueuehandler.php -b -m --pidfile=/var/run/xmppqueuehandler.pid -/sbin/start-stop-daemon -S --exec $INSTALLDIR/scripts/publicqueuehandler.php -b -m --pidfile=/var/run/publicqueuehandler.pid -/sbin/start-stop-daemon -S --exec $INSTALLDIR/scripts/xmppconfirmhandler.php -b -m --pidfile=/var/run/xmppconfirmhandler.pid -/sbin/start-stop-daemon -S --exec $INSTALLDIR/scripts/smsqueuehandler.php -b -m --pidfile=/var/run/smsqueuehandler.pid -/sbin/start-stop-daemon -S --exec $INSTALLDIR/scripts/ombqueuehandler.php -b -m --pidfile=/var/run/ombqueuehandler.pid +done