summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnis Armus <ragnis@armus.ee>2018-07-15 17:08:48 +0300
committerRagnis Armus <ragnis@armus.ee>2018-07-15 17:08:48 +0300
commit0191bf286a1f4339ceda7ab665252f10345ee80f (patch)
tree0a1a602ad6836adbdbbbc4365731fff5b8f598da
parent9b926d4712af708d2450c5cedec1554d4f9d1d8a (diff)
add example systemd unit fileHEADmaster
-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