Skip to content

Instantly share code, notes, and snippets.

@ussy
Created May 25, 2012 18:11
Show Gist options
  • Save ussy/2789601 to your computer and use it in GitHub Desktop.
Save ussy/2789601 to your computer and use it in GitHub Desktop.
daemon for play 2.0
#!/bin/sh
PLAY_HOME=/var/play
pid=`cat $PLAY_HOME/RUNNING_PID 2> /dev/null`
if [ "$pid" == "" ]; then echo "play application is not running"; exit 1; fi
kill $pid
echo "shutdown play application."
#!/bin/sh
PLAY_HOME=/var/play
if [ -e $PLAY_HOME/RUNNING_PID ]; then echo "play application is already running"; exit 1; fi
nohup $PLAY_HOME/start > /dev/null &
echo "start play application!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment