From 76e0da0ef07a921e27b12a447692d1e952d922f4 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sat, 11 Jul 2020 14:11:07 +0200 Subject: Spring cleaning --- systemd-zfs-partition-backup/AUR/PKGBUILD | 24 ++++++++++++++++++++++ .../systemd/max-backup@.service | 7 +++++++ .../udev/rules.d/99-max-autobackup.rules | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 systemd-zfs-partition-backup/AUR/PKGBUILD create mode 100644 systemd-zfs-partition-backup/systemd/max-backup@.service create mode 100644 systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules (limited to 'systemd-zfs-partition-backup') diff --git a/systemd-zfs-partition-backup/AUR/PKGBUILD b/systemd-zfs-partition-backup/AUR/PKGBUILD new file mode 100644 index 0000000..f9d7315 --- /dev/null +++ b/systemd-zfs-partition-backup/AUR/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Max Christian Pohle +pkgname=systemd-zfs-partition-backup +pkgver=2020_07_11 +# release number, always starts with 1 +pkgrel=1 +pkgdesc="automatically backup usb* drives to zfs datasets, encryption supported" +arch=('any') +url="http://git.entwicklerseite.de/zfs-auto-backup" +license=('MIT') +depends=( + 'systemd' + 'kbd' + 'mkinitcpio' +) +source=("http://git.entwicklerseite.de/zfs-bash-tools/snapshot/zfs-bash-tools-master.tar.bz2") +sha256sums=('a734c145709687c5621f430d3baec3105977984dfbb35348beab4b793aeb8e1b') + +package() { + install -D zfs-bash-tools-master/${pkgname}.sh ../pkg/${pkgname}/usr/bin/${pkgname}.sh + install -D zfs-bash-tools-master/${pkgname}/systemd/max-backup\@.service ../pkg/${pkgname}/usr/lib/systemd/system/${pkgname}.service + install -D zfs-bash-tools-master/${pkgname}/udev/rules.d/99-max-autobackup.rules ../pkg/${pkgname}/etc/udev/rules.d/99-${pkgname}.rules +} + +# vim: ft=bash diff --git a/systemd-zfs-partition-backup/systemd/max-backup@.service b/systemd-zfs-partition-backup/systemd/max-backup@.service new file mode 100644 index 0000000..d7948a8 --- /dev/null +++ b/systemd-zfs-partition-backup/systemd/max-backup@.service @@ -0,0 +1,7 @@ +[Unit] +Description=Generic backup + +[Service] +Type=simple +ExecStart=/usr/bin/systemd-zfs-partition-backup.sh %I + diff --git a/systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules b/systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules new file mode 100644 index 0000000..e17bba0 --- /dev/null +++ b/systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules @@ -0,0 +1,2 @@ +ACTION=="add", ENV{ID_PART_ENTRY_NUMBER}=="[0-9]", ENV{SYSTEMD_WANTS}="max-backup@$env{ID_SERIAL}\\x2dpart$env{ID_PART_ENTRY_NUMBER}.service" +LABEL="External disk drive backup" -- cgit v1.2.3