aboutsummaryrefslogtreecommitdiff
path: root/utils/systemd
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-10-26 00:05:46 +0800
committerKunoiSayami <[email protected]>2022-10-26 00:05:46 +0800
commit685c74c4fa212b132c55be1c91e5b366a3593b83 (patch)
tree25a9aa9024f517ce51107c89e60267fea56f105e /utils/systemd
parent596fc2317eae72d006e4c528ac3f14c4d9d712e8 (diff)
refactor: Move script out from ng folder
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'utils/systemd')
-rw-r--r--utils/systemd/update-repo-notify.service5
-rw-r--r--utils/systemd/update-repo-notify.socket16
-rw-r--r--utils/systemd/[email protected]7
3 files changed, 28 insertions, 0 deletions
diff --git a/utils/systemd/update-repo-notify.service b/utils/systemd/update-repo-notify.service
new file mode 100644
index 0000000..d7e3c9a
--- /dev/null
+++ b/utils/systemd/update-repo-notify.service
@@ -0,0 +1,5 @@
+[Unit]
+Description=Update repo notify service
+
+[Service]
+ExecStart=/var/lib/update/trigger.py \ No newline at end of file
diff --git a/utils/systemd/update-repo-notify.socket b/utils/systemd/update-repo-notify.socket
new file mode 100644
index 0000000..f14743c
--- /dev/null
+++ b/utils/systemd/update-repo-notify.socket
@@ -0,0 +1,16 @@
+[Unit]
+Description=Update repo notify socket
+
+[Socket]
+# If /var/run is not implemented as a symlink to /run, you may need to
+# specify ListenStream=/var/run/docker.sock instead.
+ListenStream=/run/update-repo-notify.sock
+SocketMode=0660
+SocketUser=update-database
+SocketGroup=http
+#Accept=yes
+MaxConnections=1
+FlushPending=yes
+
+[Install]
+WantedBy=sockets.target \ No newline at end of file
diff --git a/utils/systemd/[email protected] b/utils/systemd/[email protected]
new file mode 100644
index 0000000..6fa98da
--- /dev/null
+++ b/utils/systemd/[email protected]
@@ -0,0 +1,7 @@
+[Unit]
+Description=Update repo %i service
+
+[Service]
+User=update-database
+ExecStart=/var/lib/update/update-db.py /var/lib/update %i AAAABBBBCCCCDDDDDDDDCCCCBBBBAAAA
+#ExecStart=rsync \ No newline at end of file