utils: systemd: dir for pidfile with permissions

monerod runs as user monero which does not have write
permissions for /var/run. Use systemd's RuntimeDirectory
feature to handle this.
This commit is contained in:
redfish 2017-09-09 13:11:21 -04:00
parent 02e5dcd2fa
commit df322ddde5

View File

@ -6,12 +6,13 @@ After=network.target
User=monero User=monero
Group=monero Group=monero
WorkingDirectory=~ WorkingDirectory=~
RuntimeDirectory=monero
Type=forking Type=forking
PIDFile=/var/run/monerod.pid PIDFile=/run/monero/monerod.pid
ExecStart=/usr/bin/monerod --config-file /etc/monerod.conf \ ExecStart=/usr/bin/monerod --config-file /etc/monerod.conf \
--detach --pidfile /var/run/monerod.pid --detach --pidfile /run/monero/monerod.pid
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target