aboutsummaryrefslogtreecommitdiff
path: root/systemd-zfs-partition-backup
diff options
context:
space:
mode:
authorMax Christian Pohle2020-07-11 14:11:07 +0200
committerMax Christian Pohle2020-07-11 14:11:07 +0200
commit76e0da0ef07a921e27b12a447692d1e952d922f4 (patch)
tree656932887f776bb0f838ce86ab8d4d16f430b097 /systemd-zfs-partition-backup
parentd9804a00d1d2164f5c25d743d18bd4f6a8776f31 (diff)
downloadzfs-bash-tools-76e0da0ef07a921e27b12a447692d1e952d922f4.tar.bz2
zfs-bash-tools-76e0da0ef07a921e27b12a447692d1e952d922f4.zip
Spring cleaning
Diffstat (limited to 'systemd-zfs-partition-backup')
-rw-r--r--systemd-zfs-partition-backup/AUR/PKGBUILD24
-rw-r--r--systemd-zfs-partition-backup/systemd/max-backup@.service7
-rw-r--r--systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules2
3 files changed, 33 insertions, 0 deletions
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 @@
1# Maintainer: Max Christian Pohle <webmaster@coderonline.de>
2pkgname=systemd-zfs-partition-backup
3pkgver=2020_07_11
4# release number, always starts with 1
5pkgrel=1
6pkgdesc="automatically backup usb* drives to zfs datasets, encryption supported"
7arch=('any')
8url="http://git.entwicklerseite.de/zfs-auto-backup"
9license=('MIT')
10depends=(
11 'systemd'
12 'kbd'
13 'mkinitcpio'
14)
15source=("http://git.entwicklerseite.de/zfs-bash-tools/snapshot/zfs-bash-tools-master.tar.bz2")
16sha256sums=('a734c145709687c5621f430d3baec3105977984dfbb35348beab4b793aeb8e1b')
17
18package() {
19 install -D zfs-bash-tools-master/${pkgname}.sh ../pkg/${pkgname}/usr/bin/${pkgname}.sh
20 install -D zfs-bash-tools-master/${pkgname}/systemd/max-backup\@.service ../pkg/${pkgname}/usr/lib/systemd/system/${pkgname}.service
21 install -D zfs-bash-tools-master/${pkgname}/udev/rules.d/99-max-autobackup.rules ../pkg/${pkgname}/etc/udev/rules.d/99-${pkgname}.rules
22}
23
24# 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 @@
1[Unit]
2Description=Generic backup
3
4[Service]
5Type=simple
6ExecStart=/usr/bin/systemd-zfs-partition-backup.sh %I
7
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 @@
1ACTION=="add", ENV{ID_PART_ENTRY_NUMBER}=="[0-9]", ENV{SYSTEMD_WANTS}="max-backup@$env{ID_SERIAL}\\x2dpart$env{ID_PART_ENTRY_NUMBER}.service"
2LABEL="External disk drive backup"
..