aboutsummaryrefslogtreecommitdiff
path: root/utils/gocgi@.service
diff options
context:
space:
mode:
Diffstat (limited to 'utils/gocgi@.service')
-rw-r--r--utils/gocgi@.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/gocgi@.service b/utils/gocgi@.service
new file mode 100644
index 0000000..9f2cf4a
--- /dev/null
+++ b/utils/gocgi@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=CGI HTTP instance %i
+After=network.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/gocgi/%i.conf
+ExecStart=/usr/bin/gocgi --path "${GOCGI_BIN}" --dir "${GOCGI_WORKDIR}" --env="${GOCGI_ENV}" --listen "${STATE_DIRECTORY}/%i.sock"
+
+RuntimeDirectory=gocgi
+DynamicUser=yes
+ProtectSystem=yes
+PrivateDevices=yes
+ProtectKernelTunables=yes
+ProtectControlGroups=yes
+
+[Install]
+WantedBy=multi-user.target