Created
May 23, 2011 13:37
-
-
Save leedo/986698 to your computer and use it in GitHub Desktop.
plackup startup script
This file contains hidden or 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 characters
#!/bin/sh | |
BASE=$HOME/src/usealice | |
NAME=imageproxy | |
PSGI=psgi/$NAME.psgi | |
LOG=log/$NAME.log | |
PID=var/$NAME.pid | |
STATUS=var/$NAME.status | |
PORT=5008 | |
OPTS="--port $PORT --pid-file $PID --status-file $STATUS" | |
PLACKUP="plackup -s Twiggy -E deployment --access-log $LOG $PSGI" | |
cd $BASE | |
if [ -e $PID ]; then | |
echo "pid file found, restarting" | |
OPTS="$OPTS --restart" | |
else | |
echo "starting" | |
OPTS="$OPTS -- $PLACKUP" | |
fi | |
start_server $OPTS 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment