From a45a47da2a5039c7a66919bcb1c234d397d142ff Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Mon, 6 May 2024 01:10:59 +0000 Subject: and dyafk systemd service and enable it for user xyz --- etc/systemd/system/dyafk@.service | 14 ++++++++++++++ .../system/multi-user.target.wants/dyafk@xyz.service | 1 + 2 files changed, 15 insertions(+) create mode 100644 etc/systemd/system/dyafk@.service create mode 120000 etc/systemd/system/multi-user.target.wants/dyafk@xyz.service (limited to 'etc') 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 -- cgit v1.2.3-70-g09d2