Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/bash
# Setting the default app server file
APP_FILE="app3.js"
echo "TTNRT : about to forever start $APP_FILE"
# Getting arguments as array
ARGS=("$@")
if [ ${ARGS[0]} = "start" ]; then
echo "Staring: $APP_FILE"
echo `forever start -l forever.log -o out.log -e err.log ~/TTN-RT/"$APP_FILE"`
elif [ ${ARGS[0]} = "stop" ]; then
echo "Stopping: $APP_FILE"
echo `forever stop "$APP_FILE"`
else
echo 'Um, you didn\'t tell me what to do [start | stop]'
fi
echo 'FIN.'
@bellingboe
Copy link
Author

bellingboe commented Sep 12, 2013

I get this error

./ttnrt: line 27: unexpected EOF while looking for matching `''
./ttnrt: line 28: syntax error: unexpected end of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment