Skip to content

Instantly share code, notes, and snippets.

@madsonic
Last active July 8, 2019 09:57
Show Gist options
  • Save madsonic/fc6b9e10dfa3bc1e07569d7048c4d704 to your computer and use it in GitHub Desktop.
Save madsonic/fc6b9e10dfa3bc1e07569d7048c4d704 to your computer and use it in GitHub Desktop.
common systemd service config
[Unit]
StartLimitIntervalSec=60 #length of limit interval
StartLimitBurst=6 #start limit within interval
# i.e. can start 6 times in a span of 60 sec
ConditionPathExists=/etc/foo/foo.conf # only start if this file exists
# see other Condition* directives
[Service]
RestartSec=10 # restart every 10 if restart conditions are met
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment