Skip to content

Instantly share code, notes, and snippets.

@mbrownnycnyc
Created August 23, 2012 15:08
Show Gist options
  • Save mbrownnycnyc/3437554 to your computer and use it in GitHub Desktop.
Save mbrownnycnyc/3437554 to your computer and use it in GitHub Desktop.
jasper for icinga-reporting
#!/bin/bash
#
# chkconfig: 345 85 15
# description: init script to handle tomcat and postgres with jasperserver, relying on the packaged scripts for logic.
#branded on freenode
#mbrownnyc everywhere else
# http://mbrownnyc.wordpress.com/technology-solutions/reliability-monitoring-solution/implement-icinga-on-centos6-with-selinux/
#
JASPERCTLSCRIPT="/opt/jasperreports-server-cp-4.5.0/ctlscript.sh "
start()
{
$JASPERCTLSCRIPT start postgres
}
stop()
{
$JASPERCTLSCRIPT stop postgres
}
restart()
{
$JASPERCTLSCRIPT restart postgres
}
status()
{
$JASPERCTLSCRIPT status postgres
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
;;
esac
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment