Skip to content

Instantly share code, notes, and snippets.

@tarelli
Last active Dec 10, 2015
Embed
What would you like to do?
Automatic Virgo startup
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
#!/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