Created
August 23, 2012 15:08
-
-
Save mbrownnycnyc/3437554 to your computer and use it in GitHub Desktop.
jasper for icinga-reporting
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 | |
# | |
# 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