Created
December 20, 2011 10:50
Revisions
-
Koc revised this gist
Dec 20, 2011 . 1 changed file with 12 additions and 4 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,16 @@ set -e NAME="brouzie-php-53" RUN_AS_USER=brouzie PHP_FCGI_CHILDREN=3 PHP_FCGI_MAX_REQUESTS=200 PHP_CGI=/opt/php/5.3.8/bin/php-cgi PHP_CGI_BIND="/home/$RUN_AS_USER/php/$NAME.sock" PHP_CGI_OPTS="-b $PHP_CGI_BIND" DAEMON="/usr/bin/env" DAEMON_OPTS="- PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI $PHP_CGI_OPTS" export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" @@ -18,12 +26,12 @@ case "$1" in ;; stop) echo -n "Stopping daemon: "$NAME start-stop-daemon --stop --quiet --oknodo --exec $PHP_CGI -- $PHP_CGI_OPTS echo "." ;; restart) echo -n "Restarting daemon: "$NAME start-stop-daemon --stop --quiet --oknodo --exec $PHP_CGI -- $PHP_CGI_OPTS --retry 30 start-stop-daemon --start --quiet --chuid $RUN_AS_USER --exec $DAEMON -- $DAEMON_OPTS & echo "." ;; -
Koc revised this gist
Dec 20, 2011 . 1 changed file with 16 additions and 16 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,25 +12,25 @@ export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" case "$1" in start) echo -n "Starting daemon: "$NAME start-stop-daemon --start --quiet --chuid $RUN_AS_USER --exec $DAEMON -- $DAEMON_OPTS & echo "." ;; stop) echo -n "Stopping daemon: "$NAME start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- $DAEMON_OPTS echo "." ;; restart) echo -n "Restarting daemon: "$NAME start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- $DAEMON_OPTS --retry 30 start-stop-daemon --start --quiet --chuid $RUN_AS_USER --exec $DAEMON -- $DAEMON_OPTS & echo "." ;; *) echo "Usage: "$1" {start|stop|restart}" exit 1 esac exit 0 -
Koc created this gist
Dec 20, 2011 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/bin/sh # Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh set -e NAME="brouzie-php-53" RUN_AS_USER=brouzie DAEMON=/opt/php/5.3.8/bin/php-cgi DAEMON_OPTS="-b /home/brouzie/php/5.3.8.sock" export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" case "$1" in start) echo -n "Starting daemon: "$NAME start-stop-daemon --start --quiet --chuid $RUN_AS_USER --exec $DAEMON -- $DAEMON_OPTS & echo "." ;; stop) echo -n "Stopping daemon: "$NAME start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- $DAEMON_OPTS echo "." ;; restart) echo -n "Restarting daemon: "$NAME start-stop-daemon --stop --quiet --oknodo --exec $DAEMON -- $DAEMON_OPTS --retry 30 start-stop-daemon --start --quiet --chuid $RUN_AS_USER --exec $DAEMON -- $DAEMON_OPTS & echo "." ;; *) echo "Usage: "$1" {start|stop|restart}" exit 1 esac exit 0