diff --git a/contrib/init/bitcoind.service b/contrib/init/elementsd.service similarity index 66% rename from contrib/init/bitcoind.service rename to contrib/init/elementsd.service index 8b308644b1..9e8e8ec72f 100644 --- a/contrib/init/bitcoind.service +++ b/contrib/init/elementsd.service @@ -1,23 +1,27 @@ # It is not recommended to modify this file in-place, because it will # be overwritten during package upgrades. If you want to add further # options or overwrite existing ones then use -# $ systemctl edit bitcoind.service +# $ systemctl edit elementsd.service # See "man systemd.service" for details. # Note that almost all daemon options could be specified in -# /etc/bitcoin/bitcoin.conf, but keep in mind those explicitly +# /etc/bitcoin/elements.conf, but keep in mind those explicitly # specified as arguments in ExecStart= will override those in the # config file. [Unit] -Description=Bitcoin daemon +Description=Elements daemon After=network.target [Service] -ExecStart=/usr/bin/bitcoind -daemon \ - -pid=/run/bitcoind/bitcoind.pid \ - -conf=/etc/bitcoin/bitcoin.conf \ - -datadir=/var/lib/bitcoind +ExecStart=/usr/bin/elementsd -daemon \ + -pid=/run/elementsd/elementsd.pid \ + -conf=/etc/elements/elements.conf \ + -datadir=/var/lib/elementsd + +# 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 @@ -27,27 +31,27 @@ ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin #################### Type=forking -PIDFile=/run/bitcoind/bitcoind.pid +PIDFile=/run/elementsd/elementsd.pid Restart=on-failure TimeoutStopSec=600 # Directory creation and permissions #################################### -# Run as bitcoin:bitcoin -User=bitcoin -Group=bitcoin +# Run as elements:elements +User=elements +Group=elements -# /run/bitcoind -RuntimeDirectory=bitcoind +# /run/elementsd +RuntimeDirectory=elementsd RuntimeDirectoryMode=0710 -# /etc/bitcoin -ConfigurationDirectory=bitcoin +# /etc/elements +ConfigurationDirectory=elements ConfigurationDirectoryMode=0710 -# /var/lib/bitcoind -StateDirectory=bitcoind +# /var/lib/elementsd +StateDirectory=elementsd StateDirectoryMode=0710 # Hardening measures