summaryrefslogtreecommitdiff
path: root/net-vpn/tor/files/tor.service
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 15:37:57 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 15:38:28 +0100
commit9754f457cc6d0aeb90a1535a5228ef909e9584c9 (patch)
treeffbd77f41fb100837cc8f992f8dc863cd01c270d /net-vpn/tor/files/tor.service
parent6f9831941e9c3d2dc66d172b7acf7ecb1a5d709a (diff)
downloadgentoo-9754f457cc6d0aeb90a1535a5228ef909e9584c9.tar.gz
gentoo-9754f457cc6d0aeb90a1535a5228ef909e9584c9.tar.xz
Second half of net-vpn/ move
Diffstat (limited to 'net-vpn/tor/files/tor.service')
-rw-r--r--net-vpn/tor/files/tor.service21
1 files changed, 21 insertions, 0 deletions
diff --git a/net-vpn/tor/files/tor.service b/net-vpn/tor/files/tor.service
new file mode 100644
index 00000000000..8fcc6740ed9
--- /dev/null
+++ b/net-vpn/tor/files/tor.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=The Onion Router
+
+[Service]
+ExecStartPre=/usr/bin/tor --verify-config -f /etc/tor/torrc
+ExecStart=/usr/bin/tor --RunAsDaemon 0 -f /etc/tor/torrc
+ExecReload=/bin/kill -HUP $MAINPID
+KillSignal=SIGINT
+TimeoutStopSec=32
+LimitNOFILE=30000
+
+# Hardening options:
+CapabilityBoundingSet = CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
+PrivateTmp = yes
+PrivateDevices = yes
+ProtectHome = yes
+ProtectSystem = full
+NoNewPrivileges = yes
+
+[Install]
+WantedBy=multi-user.target