Skip to content

Instantly share code, notes, and snippets.

@mbrownnycnyc
Created August 27, 2012 14:16
Show Gist options
  • Save mbrownnycnyc/3488819 to your computer and use it in GitHub Desktop.
Save mbrownnycnyc/3488819 to your computer and use it in GitHub Desktop.
splunk init script
#!/bin/bash
#
# chkconfig: 345 85 15
# description: init script to splunk
# mbrownnyc on freenode, etc
# http://mbrownnyc.wordpress.com/technology-solutions/reliability-monitoring-solution/implement-splunk-on-centos6-with-selinux/
#
SPLUNKBIN="/opt/splunk/bin/splunk"
start()
{
$SPLUNKBIN start;
}
stop()
{
$SPLUNKBIN stop
}
restart()
{
$SPLUNKBIN restart
}
status()
{
$SPLUNKBIN status
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
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