Last active
December 10, 2015 02:39
-
-
Save tarelli/4369545 to your computer and use it in GitHub Desktop.
Automatic Virgo startup
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
Save the script as /etc/init.d/virgo | |
chmod 755 /etc/init.d/virgo | |
Make a link to it from /etc/rc3.d such as: | |
cd /etc/rc5.d | |
sudo ln -s ../init.d/virgo S90virgo | |
use chmod -R 777 on the virgo folder |
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 | |
# | |
# virgo | |
# | |
# chkconfig: | |
# description: Start up the Virgo WebServer | |
# Source function library. | |
. /etc/init.d/functions | |
RETVAL=$? | |
VIRGO_HOME="/home/virgo/virgo-tomcat-server-3.6.0.RELEASE" | |
case "$1" in | |
start) | |
if [ -f $VIRGO_HOME/bin/startup.sh ]; | |
then | |
echo $"Starting Virgo" | |
/bin/su virgo $VIRGO_HOME/bin/startup.sh | |
fi | |
;; | |
stop) | |
if [ -f $VIRGO_HOME/bin/shutdown.sh ]; | |
then | |
echo $"Stopping Virgo" | |
/bin/su virgo $VIRGO_HOME/bin/shutdown.sh | |
fi | |
;; | |
*) | |
echo "Usage: $0 {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit $RETVAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment