summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--systemd/cgit-go-import.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/systemd/cgit-go-import.service b/systemd/cgit-go-import.service
new file mode 100644
index 0000000..f04952e
--- /dev/null
+++ b/systemd/cgit-go-import.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=go-import server for cgit
+
+[Service]
+PermissionsStartOnly=true
+ExecStartPre=-/bin/mkdir /var/run/%p
+ExecStartPre=/bin/chown -R www-data:www-data /var/run/%p
+ExecStart=/usr/local/go/bin/cgit-go-import -bind unix:/run/%p/http.sock
+ExecReload=/bin/kill -USR1 $MAINPID
+User=www-data
+Group=www-data
+
+[Install]
+WantedBy=multi-user.target