From 6ed81cd85c4b33e2b5d3cb78ddafc70a8adf521b Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Sun, 28 Aug 2022 12:10:27 +0200 Subject: [PATCH] Add Systemd templates --- systemd-templates/packages-upgrade-apt.service | 7 +++++++ systemd-templates/packages-upgrade-pacman.service | 6 ++++++ systemd-templates/packages-upgrade.timer | 10 ++++++++++ 3 files changed, 23 insertions(+) create mode 100644 systemd-templates/packages-upgrade-apt.service create mode 100644 systemd-templates/packages-upgrade-pacman.service create mode 100644 systemd-templates/packages-upgrade.timer diff --git a/systemd-templates/packages-upgrade-apt.service b/systemd-templates/packages-upgrade-apt.service new file mode 100644 index 0000000..5e7b58e --- /dev/null +++ b/systemd-templates/packages-upgrade-apt.service @@ -0,0 +1,7 @@ +[Unit] +Description=Run APT to upgrade packages + +[Service] +Type=oneshot +ExecStartPre=/usr/bin/apt-get update +ExecStart=/usr/bin/apt-get upgrade -y diff --git a/systemd-templates/packages-upgrade-pacman.service b/systemd-templates/packages-upgrade-pacman.service new file mode 100644 index 0000000..da7cda8 --- /dev/null +++ b/systemd-templates/packages-upgrade-pacman.service @@ -0,0 +1,6 @@ +[Unit] +Description=Run Pacman to upgrade packages + +[Service] +Type=oneshot +ExecStart=/usr/bin/pacman -Syu --noconfirm diff --git a/systemd-templates/packages-upgrade.timer b/systemd-templates/packages-upgrade.timer new file mode 100644 index 0000000..74b007f --- /dev/null +++ b/systemd-templates/packages-upgrade.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run packages-upgrade daily + +[Timer] +Unit=packages-upgrade.service +OnCalendar=*-*-* 07:00:00 +Persistent=true + +[Install] +WantedBy=timers.target