summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Nguyen <j@jamielinux.com>2015-12-06 14:02:17 +0000
committerJamie Nguyen <j@jamielinux.com>2015-12-06 14:02:17 +0000
commitf0cf68d166e067469f7428e75a2bdb3e389dc58e (patch)
treee5267d1fd10293fa60007104cca761e75d3adc06
parentc98fdc6fe4f49eeddb2a27595bb3d82f3403a44c (diff)
Add PermissionsStartOnly=yes and RestartSec=1 to service file
-rw-r--r--tor-master.service5
-rw-r--r--tor.service2
-rw-r--r--tor@.service2
3 files changed, 8 insertions, 1 deletions
diff --git a/tor-master.service b/tor-master.service
index 4b21b7f..e6fce78 100644
--- a/tor-master.service
+++ b/tor-master.service
@@ -1,4 +1,7 @@
-# systemd targets cannot be reloaded, so use a service instead.
+# Use tor-master.service to restart/reload/stop the main tor.service and
+# all instances of tor@.service that are running.
+#
+# systemd targets cannot be reloaded so this is a service instead.
[Unit]
Description=Anonymizing overlay network for TCP (multi-instance master)
diff --git a/tor.service b/tor.service
index 86e0921..4c60acf 100644
--- a/tor.service
+++ b/tor.service
@@ -13,6 +13,7 @@ ExecReload=/bin/kill -HUP ${MAINPID}
KillSignal=SIGINT
TimeoutSec=30
Restart=on-failure
+RestartSec=1
WatchdogSec=1m
LimitNOFILE=32768
@@ -26,6 +27,7 @@ ReadOnlyDirectories=/
ReadWriteDirectories=/var/lib/tor
ReadWriteDirectories=/var/log/tor
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
+PermissionsStartOnly=yes
[Install]
WantedBy = multi-user.target
diff --git a/tor@.service b/tor@.service
index 08933bc..8a5e1ed 100644
--- a/tor@.service
+++ b/tor@.service
@@ -13,6 +13,7 @@ ExecReload=/bin/kill -HUP ${MAINPID}
KillSignal=SIGINT
TimeoutSec=30
Restart=on-failure
+RestartSec=1
WatchdogSec=1m
LimitNOFILE=32768
@@ -26,6 +27,7 @@ ReadOnlyDirectories=/
ReadWriteDirectories=/var/lib/tor
ReadWriteDirectories=/var/log/tor
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
+PermissionsStartOnly=yes
[Install]
WantedBy = multi-user.target