aboutsummaryrefslogtreecommitdiffsponsor
path: root/contrib/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/systemd')
-rw-r--r--contrib/systemd/mirror.service19
-rw-r--r--contrib/systemd/mirror.sysusers1
2 files changed, 20 insertions, 0 deletions
diff --git a/contrib/systemd/mirror.service b/contrib/systemd/mirror.service
new file mode 100644
index 0000000..5ccfbd0
--- /dev/null
+++ b/contrib/systemd/mirror.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=The mirror service
+Documentation=https://git.server.ky/slackcoder/mirror/
+After=network-online.target syslog.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+ExecStart=/usr/local/bin/mirror
+ExecStop=/bin/kill -TERM $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+RestartSec=30
+StandardOutput=journal
+StandardError=inherit
+SyslogIdentifier=mirror
+
+[Install]
+WantedBy=multi-user.target
diff --git a/contrib/systemd/mirror.sysusers b/contrib/systemd/mirror.sysusers
new file mode 100644
index 0000000..830c5c8
--- /dev/null
+++ b/contrib/systemd/mirror.sysusers
@@ -0,0 +1 @@
+u mirror - "mirror service" - -