diff options
| -rw-r--r-- | source/app.d | 3 | ||||
| -rw-r--r-- | systemd/boobbot.service | 13 | ||||
| -rw-r--r-- | systemd/boobjob.timer | 11 |
3 files changed, 26 insertions, 1 deletions
diff --git a/source/app.d b/source/app.d index b60e192..1fc10af 100644 --- a/source/app.d +++ b/source/app.d @@ -14,5 +14,6 @@ void main() ); auto boobFormat = "boob is short for\n\n" ~ generator.formatBackronymList("boob"); - writefln("%s", misskey.createNote(new BasicNote("public", boobFormat))); + writefln("-- dry --\n%s", boobFormat); +// writefln("%s", misskey.createNote(new BasicNote("public", boobFormat))); } 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 |
