Skip to content

Instantly share code, notes, and snippets.

@tarelli
Last active December 10, 2015 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarelli/4369545 to your computer and use it in GitHub Desktop.
Save tarelli/4369545 to your computer and use it in GitHub Desktop.
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