mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 18:11:03 +00:00
71693f06a1
The default monero.conf file depends on the existence of the folders `/var/log/monero/` and `/var/lib/monero/`. This change makes sure systemd will create them, together with the proper permissions, if they don't exist. `StateDirectory` can be considered an extra safety in case the user `monero` happens to have been created with specifying `/var/lib/monero/` as a home folder but without actually creating it.
38 lines
1 KiB
Desktop File
38 lines
1 KiB
Desktop File
[Unit]
|
|
Description=Monero Full Node
|
|
After=network.target
|
|
|
|
[Service]
|
|
User=monero
|
|
Group=monero
|
|
WorkingDirectory=~
|
|
RuntimeDirectory=monero
|
|
StateDirectory=monero
|
|
LogsDirectory=monero
|
|
|
|
# Clearnet config
|
|
#
|
|
Type=forking
|
|
PIDFile=/run/monero/monerod.pid
|
|
ExecStart=/usr/bin/monerod --config-file /etc/monerod.conf \
|
|
--detach --pidfile /run/monero/monerod.pid
|
|
|
|
# Tor config
|
|
#
|
|
## We have to use simple, not forking, because we cannot pass --detach
|
|
## because stderr/stdout is not available when detached, but torsocks
|
|
## attempts to write to it, and fails with 'invalid argument', causing
|
|
## monerod to fail.
|
|
#Type=simple
|
|
#Environment=DNS_PUBLIC=tcp
|
|
## The following is needed only when accessing wallet from a different
|
|
## host in the LAN, VPN, etc, the RPC must bind to 0.0.0.0, but
|
|
## by default torsocks only allows binding to localhost.
|
|
#Environment=TORSOCKS_ALLOW_INBOUND=1
|
|
#ExecStart=/usr/bin/torsocks /usr/bin/monerod --config-file /etc/monerod.conf \
|
|
# --non-interactive
|
|
|
|
Restart=always
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|