Skip to content

Instantly share code, notes, and snippets.

@bellingboe
Created September 12, 2013 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bellingboe/6541157 to your computer and use it in GitHub Desktop.
Save bellingboe/6541157 to your computer and use it in GitHub Desktop.
#!/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

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