From 5704353d55f60b69232691614a7e94369bde8ff3 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Mon, 6 Dec 2021 23:48:40 +0200 Subject: [PATCH] systemd: copy matterbridge restarter into gitea one It used to stop working randomly without a good reason, but that is likely fixed upstream a long time ago and while I removed it from cron, these units exist so should the issue recur, I can throw these back in. The cron wasn't randomized though, but I don't think there is harm in this being a bit random. --- etc/systemd/system/gitea-restart.service | 6 ++++++ etc/systemd/system/gitea-restart.timer | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 etc/systemd/system/gitea-restart.service create mode 100644 etc/systemd/system/gitea-restart.timer diff --git a/etc/systemd/system/gitea-restart.service b/etc/systemd/system/gitea-restart.service new file mode 100644 index 00000000..b43ae5b4 --- /dev/null +++ b/etc/systemd/system/gitea-restart.service @@ -0,0 +1,6 @@ +[Unit] +Description=Gitea restarter + +[Service] +Type=oneshot +ExecStart=/bin/systemctl restart gitea.service --quiet diff --git a/etc/systemd/system/gitea-restart.timer b/etc/systemd/system/gitea-restart.timer new file mode 100644 index 00000000..6e639f86 --- /dev/null +++ b/etc/systemd/system/gitea-restart.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Execute Gitea restarter daily between 05-06 Finnish time + +[Timer] +OnCalendar=*-*-* 05:00:00 Europe/Helsinki +#OnBootSec=0 +RandomizedDelaySec=1h +Persistent=true + +[Install] +WantedBy=timers.target