Created
October 24, 2010 00:19
-
-
Save javiertoledo/642880 to your computer and use it in GitHub Desktop.
Init script for glassfish
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/sh | |
GLASSFISHPATH=/usr/share/glassfishv2/bin | |
GLASSFISHDOMAINHOME=/var/lib/glassfishv2/domains/domain1 | |
case "$1" in | |
start) | |
echo "starting glassfish from $GLASSFISHPATH" | |
sudo -u glassfish $GLASSFISHPATH/asadmin start-domain --user admin --passwordfile ${GLASSFISHDOMAINHOME}/config/passwordfile domain1 | |
;; | |
restart) | |
$0 stop | |
$0 start | |
;; | |
stop) | |
echo "stopping glassfish from $GLASSFISHPATH" | |
sudo -u glassfish $GLASSFISHPATH/asadmin stop-domain domain1 | |
;; | |
*) | |
echo $"usage: $0 {start|stop|restart}" | |
exit 3 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment