Created
January 29, 2014 16:36
-
-
Save alexandrusavin/8691835 to your computer and use it in GitHub Desktop.
Wrapper script for starting/stopping Glassfish3 application with supervisord
This file contains 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/bash | |
pidfile=/path/to/the/pidfile | |
function stopDomain { | |
echo "Sutting down domain." | |
/path/to/bin/asadmin stop-domain name | |
} | |
function startDomain { | |
echo "Starting zoobe domain" | |
/path/to/bin/asadmin start-domain name | |
while [ -e ${pidfile} ]; do sleep 0.1; done | |
} | |
trap stopDomain HUP INT QUIT ABRT KILL ALRM TERM TSTP | |
startDomain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment