aboutsummaryrefslogtreecommitdiffsponsor
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-10-23 08:56:17 -0500
committerSlack Coder <slackcoder@server.ky>2024-10-23 09:07:21 -0500
commit58b725f923ce0f815b45633015306523dfc0f9a8 (patch)
tree4ce55e48fe2957c17d25ae99f69a14ed80f1ab8c
parentca3a097505c42c2aec16e208c571c1b496c4b14b (diff)
downloadmirror-58b725f923ce0f815b45633015306523dfc0f9a8.tar.xz
contrib: Add systemd files
-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" - -