aboutsummaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-05-12 20:46:13 +0200
committerLinnea Gräf <nea@nea.moe>2025-05-12 20:46:13 +0200
commit43955dc3cf4988411ed65ac20043f02233ae5876 (patch)
treeec7d12470d71e67de3065193d1c848e8127d9e0c /systemd
parent4a6ddab6da2bfce1c97a1138ba529f9b9691d998 (diff)
downloadboobbot-43955dc3cf4988411ed65ac20043f02233ae5876.tar.gz
boobbot-43955dc3cf4988411ed65ac20043f02233ae5876.tar.bz2
boobbot-43955dc3cf4988411ed65ac20043f02233ae5876.zip
add systemd timer
Diffstat (limited to 'systemd')
-rw-r--r--systemd/boobbot.service13
-rw-r--r--systemd/boobjob.timer11
2 files changed, 24 insertions, 0 deletions
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