Skip to content

Instantly share code, notes, and snippets.

@channprj
Last active February 8, 2019 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save channprj/e68fbfd8803155080401e1195b38871c to your computer and use it in GitHub Desktop.
Save channprj/e68fbfd8803155080401e1195b38871c to your computer and use it in GitHub Desktop.
Very simple and naive systemd daemon for simple api.
[Unit]
Description=Simple API Service
[Service]
Type=simple
ExecStart=/opt/simple/simple-api
ExecStop=kill $(pgrep -f simple-api)
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment