aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-14 13:38:12 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-14 13:38:12 +0200
commitba5f143c09562840c8f84a5208e4cd7df732f96c (patch)
tree3f33f0ea7af8a80d25ef25c94d822b58f511ad6e /utils
parentMerge pull request #3375 (diff)
parentsystemd,readme: torsocks config for service (diff)
downloadmonero-ba5f143c09562840c8f84a5208e4cd7df732f96c.tar.xz
Merge pull request #3381
fcb180f5 systemd,readme: torsocks config for service (redfish)
Diffstat (limited to 'utils')
-rw-r--r--utils/systemd/monerod.service18
1 files changed, 17 insertions, 1 deletions
diff --git a/utils/systemd/monerod.service b/utils/systemd/monerod.service
index 696be4c33..5f37e54b2 100644
--- a/utils/systemd/monerod.service
+++ b/utils/systemd/monerod.service
@@ -8,12 +8,28 @@ Group=monero
WorkingDirectory=~
RuntimeDirectory=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]