Play Framework Start/Stop Bash Scripts


   play stage

start.sh:

    #!/bin/bash
    nohup /var/play/myapp/target/universal/stage/bin/myapp-Dhttp.port=8484 &

stop.sh:

    #!/bin/bash
    pid=`cat /var/play/myapp/target/universal/stage/RUNNING_PID 2> /dev/null`
    if [ "$pid" == "" ]; then echo "play app is not running"; exit 0; fi
    echo "Stopping play app..."
    kill -SIGTERM $pid

tail.sh

   #!/bin/bash
   tail -f /var/play/myapp/target/universal/stage/logs/application.log
Advertisements

One thought on “Play Framework Start/Stop Bash Scripts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s