summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-05-06 01:10:59 +0000
committerXiao Pan <gky44px1999@gmail.com>2024-05-06 01:10:59 +0000
commita45a47da2a5039c7a66919bcb1c234d397d142ff (patch)
tree572296ec852d7891952673d9a12b88a6f61f1e37 /etc
parent3346f709a9164b12c00bd8dc64e2cc05d8b2a513 (diff)
and dyafk systemd service and enable it for user xyz
Diffstat (limited to 'etc')
-rw-r--r--etc/systemd/system/dyafk@.service14
l---------etc/systemd/system/multi-user.target.wants/dyafk@xyz.service1
2 files changed, 15 insertions, 0 deletions
diff --git a/etc/systemd/system/dyafk@.service b/etc/systemd/system/dyafk@.service
new file mode 100644
index 00000000..e5840703
--- /dev/null
+++ b/etc/systemd/system/dyafk@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Douyu AFK for user %I
+After=network.target
+
+[Service]
+User=%i
+
+Type=simple
+ExecStart=/usr/bin/dyafk
+
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/etc/systemd/system/multi-user.target.wants/dyafk@xyz.service b/etc/systemd/system/multi-user.target.wants/dyafk@xyz.service
new file mode 120000
index 00000000..b5e40b24
--- /dev/null
+++ b/etc/systemd/system/multi-user.target.wants/dyafk@xyz.service
@@ -0,0 +1 @@
+/etc/systemd/system/dyafk@.service \ No newline at end of file