From a6f933c5d588d51b217a5b77720191cf75ef9c8e Mon Sep 17 00:00:00 2001 From: localhorst Date: Mon, 20 Jun 2022 18:05:34 +0200 Subject: [PATCH] added systemd service files and cronjob example --- CheckAutoBackup.service | 11 +++++++++++ CheckAutoBackup.timer | 7 +++++++ README.md | 8 ++++++++ 3 files changed, 26 insertions(+) create mode 100644 CheckAutoBackup.service create mode 100644 CheckAutoBackup.timer diff --git a/CheckAutoBackup.service b/CheckAutoBackup.service new file mode 100644 index 0000000..e954f3b --- /dev/null +++ b/CheckAutoBackup.service @@ -0,0 +1,11 @@ +[Unit] +Description=Check AutoBackup +After=syslog.target network.target +[Service] +RestartSec=2s +Type=oneshot +User=root +Group=root +ExecStart=/root/check_AutoBackup.sh +[Install] +WantedBy=multi-user.target diff --git a/CheckAutoBackup.timer b/CheckAutoBackup.timer new file mode 100644 index 0000000..cc0f581 --- /dev/null +++ b/CheckAutoBackup.timer @@ -0,0 +1,7 @@ +[Unit] +Description=Check AutoBackup Timer +[Timer] +Persistent=false +OnCalendar=*-*-* 2,8,14,20:05:00 +[Install] +WantedBy=basic.target \ No newline at end of file diff --git a/README.md b/README.md index 6ef796d..f3df94d 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,14 @@ repos_interval[0]=21600 #sec repos_interval_tolerance[0]=10 #% ``` #### 6. install crontab or systemd-timer +For systemd see +`CheckAutoBackup.service` and `CheckAutoBackup.timer` + +For corntab see + +``` +5 2,8,14,20 * * * /root/check_AutoBackup.sh >/dev/null 2>& +``` #### 7. optional install FTDI simple alarm