From 43955dc3cf4988411ed65ac20043f02233ae5876 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 12 May 2025 20:46:13 +0200 Subject: add systemd timer --- systemd/boobbot.service | 13 +++++++++++++ systemd/boobjob.timer | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 systemd/boobbot.service create mode 100644 systemd/boobjob.timer (limited to 'systemd') diff --git a/systemd/boobbot.service b/systemd/boobbot.service new file mode 100644 index 0000000..67a5584 --- /dev/null +++ b/systemd/boobbot.service @@ -0,0 +1,13 @@ +# Service to load and execute the boobbot timer + +[Unit] +Description=Posts a boob joke to fedi +Wants=boobjob.timer + +[Service] +Type=oneshot +ExecStart=$SOURCE/boobbot +EnvironmentFile=$SOURCE/.env + +[Install] +WantedBy=multi-user.target diff --git a/systemd/boobjob.timer b/systemd/boobjob.timer new file mode 100644 index 0000000..df6354b --- /dev/null +++ b/systemd/boobjob.timer @@ -0,0 +1,11 @@ +# Timer for posting a boob joke once a day +[Unit] +Description=Posts a boob joke +Requires=boobbot.service + +[Timer] +Unit=boobbot.service +OnCalendar=daily + +[Install] +WantedBy=timers.target -- cgit