aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/pacman-offline
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/pacman-offline')
-rwxr-xr-xsystemd/pacman-offline17
1 files changed, 17 insertions, 0 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
new file mode 100755
index 0000000..9764666
--- /dev/null
+++ b/systemd/pacman-offline
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+# verify this is for us or exit gracefully
+if [ "$(readlink '/system-update')" != '/var/cache/pacman/pkg' ]; then
+ exit 0
+fi
+
+# install updates
+pacman -Su --noconfirm
+
+# remove triggering symlink
+rm -f /system-update
+
+# reboot
+systemctl reboot