Skip to content

Instantly share code, notes, and snippets.

@AntoniosHadji
Created September 25, 2017 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AntoniosHadji/45d379e8dab45bfaf2742f3c0c0b6006 to your computer and use it in GitHub Desktop.
Save AntoniosHadji/45d379e8dab45bfaf2742f3c0c0b6006 to your computer and use it in GitHub Desktop.
systemd unit file for parity with clean exits
[Unit]
Description=Parity Daemon
After=network.target
[Service]
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines
ExecStart=/usr/bin/parity --config /etc/parity/config.toml
# Specifies how processes of this unit shall be killed.
# One of control-group, process, mixed, none.
#KillMode=control-group
# Specifies which signal to use when killing a service. Defaults to SIGTERM.
# For valid signals, see http://man7.org/linux/man-pages/man7/signal.7.html
# SIGHUP gives parity 90 seconds to exit cleanly before SIGKILL
KillSignal=SIGHUP
# Specifies whether to send SIGHUP to remaining processes immediately after
# sending the signal configured with KillSignal=.
#SendSIGHUP=no
# Specifies whether to send SIGKILL to remaining processes after a timeout
#SendSIGKILL=yes
[Install]
WantedBy=default.target
# settings above that are commented out show default values
# https://www.freedesktop.org/software/systemd/man/systemd.unit.html
# boolean settings
# For positive settings the strings 1, yes, true and on are equivalent.
# For negative settings, the strings 0, no, false and off are equivalent.
# Default timeout is 90s
# https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html#DefaultTimeoutStartSec=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment