diff options
author | Christian Hesse <mail@eworm.de> | 2017-09-28 22:51:43 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-09-28 22:51:43 +0200 |
commit | da536e2381b9c399f7c3beaff322abac91c8be85 (patch) | |
tree | 7dfdd4e2b4d777307b2e79893c58f45bc19dcccf | |
parent | c53dcadab9cebef99622f016fd828028aaab2c95 (diff) | |
download | pacman-offline-da536e2381b9c399f7c3beaff322abac91c8be85.tar.gz pacman-offline-da536e2381b9c399f7c3beaff322abac91c8be85.tar.zst |
add timer to prepare system-update
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | systemd/pacman-offline-prepare.service | 10 | ||||
-rw-r--r-- | systemd/pacman-offline-prepare.timer | 9 |
3 files changed, 21 insertions, 0 deletions
@@ -15,6 +15,8 @@ install: $(INSTALL) -D -m0755 bin/pacman-offline $(DESTDIR)/usr/bin/pacman-offline $(INSTALL) -D -m0644 systemd/pacman-offline.service $(DESTDIR)/usr/lib/systemd/system/pacman-offline.service $(INSTALL) -D -m0755 systemd/pacman-offline $(DESTDIR)/usr/lib/systemd/scripts/pacman-offline + $(INSTALL) -D -m0644 systemd/pacman-offline-prepare.service $(DESTDIR)/usr/lib/systemd/system/pacman-offline-prepare.service + $(INSTALL) -D -m0644 systemd/pacman-offline-prepare.timer $(DESTDIR)/usr/lib/systemd/system/pacman-offline-prepare.timer $(INSTALL) -d -m0755 $(DESTDIR)/usr/lib/systemd/system/system-update.target.wants/ $(LN) -s ../pacman-offline.service $(DESTDIR)/usr/lib/systemd/system/system-update.target.wants/pacman-offline.service diff --git a/systemd/pacman-offline-prepare.service b/systemd/pacman-offline-prepare.service new file mode 100644 index 0000000..59cc76f --- /dev/null +++ b/systemd/pacman-offline-prepare.service @@ -0,0 +1,10 @@ +[Unit] +Description=Prepare pacman offline system-update + +[Service] +Type=oneshot +ExecStart=/usr/bin/pacman-offline -y +ProtectSystem=on +ProtectHome=on +PrivateDevices=on +NoNewPrivileges=on diff --git a/systemd/pacman-offline-prepare.timer b/systemd/pacman-offline-prepare.timer new file mode 100644 index 0000000..75ce355 --- /dev/null +++ b/systemd/pacman-offline-prepare.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Prepare pacman offline system-update + +[Timer] +OnBootSec=5min +OnUnitActiveSec=1d + +[Install] +WantedBy=timers.target |