Skip to content

Instantly share code, notes, and snippets.

@faststeak
Created August 2, 2018 19:25
Show Gist options
  • Save faststeak/61ce55924b58ac0cafaeb4b6f415be3c to your computer and use it in GitHub Desktop.
Save faststeak/61ce55924b58ac0cafaeb4b6f415be3c to your computer and use it in GitHub Desktop.
Splunk Unit File
#/etc/systemd/system/splunkd.service
# https://answers.splunk.com/answers/59662/is-there-a-systemd-unit-file-for-splunk.html
[Unit]
Description=Splunk Enterprise
After=network.target
Wants=network.target
[Service]
#Type=forking
Type=simple
RemainAfterExit=true
User=splunk
Group=splunk
LimitNOFILE=65536
ExecStart=/opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt
ExecStop=/opt/splunk/bin/splunk stop
#ExecRestart=/opt/splunk/bin/splunk restart
#PIDFile=/opt/splunk/var/run/splunk/splunkd.pid
RestartSec=3600
TimeoutSec=3600
[Install]
WantedBy=multi-user.target
# If you want to use $(systemctl [start|stop|restart] splunk) instead of splunkd ...
Alias=splunk.service
ln -sf /usr/lib/systemd/system/splunk.service splunk.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment