From 7ea007fb491bc7ca2b8efbfeb015ed1a6004f100 Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 20 Feb 2024 22:15:27 +0100 Subject: [PATCH] hotfix because the backup script kept starting and crashing everything before it had networkaccess or forgejo got closed --- backup.nix | 4 ++++ configuration.nix | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/backup.nix b/backup.nix index d95020e..9e46c3f 100644 --- a/backup.nix +++ b/backup.nix @@ -42,6 +42,9 @@ let ExecStart = "${forgejo-borgbackup}/bin/forgejo-borgbackup"; User = "root"; }; + requires= ["mysql.service"]; + after = ["forgejo.service" "mysql.service" "network-online.target"]; + wants = ["network-online.target"]; wantedBy = [ "multi-user.target" ]; }; @@ -49,6 +52,7 @@ let description = "Daily Borg Backup Timer"; wantedBy = [ "timers.target" ]; timerConfig = { + OnActiveSec = "30s"; OnCalendar = "daily"; Persistent = true; }; diff --git a/configuration.nix b/configuration.nix index 74b619a..506d783 100644 --- a/configuration.nix +++ b/configuration.nix @@ -43,7 +43,8 @@ git vim wget - curl + curl + htop ];