Skip to content

Instantly share code, notes, and snippets.

@wilxsv
Created December 13, 2016 04:26
Show Gist options
  • Save wilxsv/6b186022c082f75cbb7447e52a1b38d2 to your computer and use it in GitHub Desktop.
Save wilxsv/6b186022c082f75cbb7447e52a1b38d2 to your computer and use it in GitHub Desktop.
Script para iniciar jasper server como demonio de debian - http://community.jaspersoft.com/questions/541044/auto-start-boot
#!/bin/sh
# Tomado del sitio http://community.jaspersoft.com/questions/541044/auto-start-boot
### BEGIN INIT INFO
# Provides: jasperserver
# Required-Start: $local_fs $remote_fs $network $time $syslog
# Required-Stop: $local_fs $remote_fs $network $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start JasperServer at boot time
# Description: Enable service provided by JasperServer.
### END INIT INFO
JASPER_HOME="/opt/jasperreports-server-cp-6.3.0"
case "$1" in
start)
if [ -f $JASPER_HOME/ctlscript.sh ]; then
echo "Starting JasperServer"
$JASPER_HOME/ctlscript.sh start
fi
;;
stop)
if [ -f $JASPER_HOME/ctlscript.sh ]; then
echo "Stopping JasperServer"
$JASPER_HOME/ctlscript.sh stop
fi
;;
restart)
if [ -f $JASPER_HOME/ctlscript.sh ]; then
echo "Restarting JasperServer"
$JASPER_HOME/ctlscript.sh restart
fi
;;
status)
if [ -f $JASPER_HOME/ctlscript.sh ]; then
$JASPER_HOME/ctlscript.sh status
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment