]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Added boot service
authorNicoHood <nicohood@users.noreply.github.com>
Thu, 1 Sep 2016 21:20:35 +0000 (23:20 +0200)
committerNicoHood <nicohood@users.noreply.github.com>
Fri, 2 Sep 2016 14:02:00 +0000 (16:02 +0200)
data/Makefile.am
data/boot.service [new file with mode: 0644]
data/boot.timer [new file with mode: 0644]

index 82534408c237be93714188eb23eb79cac7ad2528..ec9e75832ce097678f3514dfd22666fa0cf770b0 100644 (file)
@@ -25,8 +25,9 @@ install-data-local:
        install -D -m 644 timeline.timer $(DESTDIR)/usr/lib/systemd/system/snapper-timeline.timer
        install -D -m 644 cleanup.service $(DESTDIR)/usr/lib/systemd/system/snapper-cleanup.service
        install -D -m 644 cleanup.timer $(DESTDIR)/usr/lib/systemd/system/snapper-cleanup.timer
+       install -D -m 644 boot.service $(DESTDIR)/usr/lib/systemd/system/snapper-boot.service
+       install -D -m 644 boot.timer $(DESTDIR)/usr/lib/systemd/system/snapper-boot.timer
 
 if HAVE_ZYPP
        install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf
 endif
-
diff --git a/data/boot.service b/data/boot.service
new file mode 100644 (file)
index 0000000..2801a4b
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Take snapper snapshot of root on boot
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/snapper --config root create --cleanup-algorithm number --description "boot"
diff --git a/data/boot.timer b/data/boot.timer
new file mode 100644 (file)
index 0000000..92dc77e
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Take snapper snapshot of root on boot
+
+[Timer]
+OnBootSec=1
+
+[Install]
+WantedBy=basic.target