diff --git a/contrib/init/elementsd.service b/contrib/init/elementsd.service index 2eb2ca8956..7a3db08be8 100644 --- a/contrib/init/elementsd.service +++ b/contrib/init/elementsd.service @@ -5,7 +5,7 @@ # See "man systemd.service" for details. # Note that almost all daemon options could be specified in -# /etc/bitcoin/elements.conf, but keep in mind those explicitly +# /etc/elements/elements.conf, but keep in mind those explicitly # specified as arguments in ExecStart= will override those in the # config file. @@ -18,24 +18,23 @@ After=network-online.target Wants=network-online.target [Service] -ExecStart=/usr/bin/elementsd -daemonwait \ - -pid=/run/elementsd/elementsd.pid \ +ExecStart=/usr/bin/elementsd -pid=/run/elementsd/elementsd.pid \ -conf=/etc/elements/elements.conf \ - -datadir=/var/lib/elementsd + -datadir=/var/lib/elementsd \ + -startupnotify='systemd-notify --ready' \ + -shutdownnotify='systemd-notify --stopping' # Make sure the config directory is readable by the service user PermissionsStartOnly=true ExecStartPre=/bin/chgrp elements /etc/elements -# Make sure the config directory is readable by the service user -PermissionsStartOnly=true -ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin - # Process management #################### -Type=forking +Type=notify +NotifyAccess=all PIDFile=/run/elementsd/elementsd.pid + Restart=on-failure TimeoutStartSec=infinity TimeoutStopSec=600