summarylogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service26
1 files changed, 26 insertions, 0 deletions
diff --git a/service b/service
new file mode 100644
index 000000000000..081ebad2aa3d
--- /dev/null
+++ b/service
@@ -0,0 +1,26 @@
+[Unit]
+Description=Google Safe Browsing API
+After=network.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+EnvironmentFile=/etc/google-safebrowsing/config
+User=gsb
+ExecStart=/usr/lib/google-safebrowsing/sbserver -srvaddr "$LISTEN" -apikey "$API_KEY" -db /var/lib/google-safebrowsing/db
+
+WorkingDirectory=~
+StateDirectory=google-safebrowsing
+StateDirectoryMode=0750
+Restart=on-failure
+
+# Hardening
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectKernelTunables=yes
+ProtectControlGroups=yes
+ProtectSystem=full
+