summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Reynolds2016-06-07 07:33:01 -0400
committerM.Reynolds2016-06-07 07:33:01 -0400
commitd9f427aee4d89a64deefd7da3e2d4bc4971b4080 (patch)
treed160d22e2c21ee84aedc5b4dbfef80336586a199
downloadaur-d9f427aee4d89a64deefd7da3e2d4bc4971b4080.tar.gz
Initial package upload
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD36
-rw-r--r--raid-check-systemd.install10
-rw-r--r--raid-check.service6
-rw-r--r--raid-check.timer11
5 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6b08732af553
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = raid-check-systemd
+ pkgdesc = Raid data scrubbing script with systemd timer to be used with mdadm.
+ pkgver = 3.3.2
+ pkgrel = 1
+ url = https://wiki.archlinux.org/index.php/RAID#Scrubbing
+ install = raid-check-systemd.install
+ arch = any
+ license = GPL
+ makedepends = rpmextract
+ depends = mdadm
+ depends = systemd
+ conflicts = raid-check
+ source = http://mirror.centos.org/centos/7/os/x86_64/Packages/mdadm-3.3.2-7.el7.x86_64.rpm
+ source = raid-check.service
+ source = raid-check.timer
+ sha256sums = b319904cfb0d5dd20e8cf9e7bd781d77b0aaca9f932ebf0c950bf9ad4dcd400c
+ sha256sums = 90db8f53984df9d7ab32fde09a853632e9d76cbd91224c0efd760406118af84b
+ sha256sums = d023663e888500f1e75466935a47e16f705442e004a526115b054c932535f462
+
+pkgname = raid-check-systemd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0c2b9dded534
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: M.Reynolds <blackboxnetworkproject@gmail.com>
+
+pkgname=raid-check-systemd
+pkgver=3.3.2
+pkgrel=1
+_cent_rel=7
+pkgdesc="Raid data scrubbing script with systemd timer to be used with mdadm."
+arch=('any')
+url="https://wiki.archlinux.org/index.php/RAID#Scrubbing"
+license=('GPL')
+depends=('mdadm' 'systemd')
+makedepends=('rpmextract')
+conflicts=('raid-check')
+install=$pkgname.install
+source=("http://mirror.centos.org/centos/7/os/x86_64/Packages/mdadm-$pkgver-$_cent_rel.el7.x86_64.rpm"
+ 'raid-check.service'
+ 'raid-check.timer')
+sha256sums=('b319904cfb0d5dd20e8cf9e7bd781d77b0aaca9f932ebf0c950bf9ad4dcd400c'
+ '90db8f53984df9d7ab32fde09a853632e9d76cbd91224c0efd760406118af84b'
+ 'd023663e888500f1e75466935a47e16f705442e004a526115b054c932535f462')
+
+# --- Source package is also available from the Fedora project mirrors ---
+# https://mirrors.kernel.org/fedora/releases/23/Everything/x86_64/os/Packages/m/mdadm-3.3.2-2.fc23.x86_64.rpm
+
+build() {
+ cd $srcdir
+ sed -i 's|sysconfig|conf.d|g' 'usr/sbin/raid-check'
+}
+
+package() {
+ install -Dm 755 "$srcdir"/usr/sbin/raid-check "$pkgdir"/usr/bin/raid-check
+ install -Dm 644 "$srcdir"/etc/sysconfig/raid-check "$pkgdir"/etc/conf.d/raid-check
+
+ install -Dm 644 raid-check.service "$pkgdir/usr/lib/systemd/system/raid-check.service"
+ install -Dm 644 raid-check.timer "$pkgdir/usr/lib/systemd/system/raid-check.timer"
+}
diff --git a/raid-check-systemd.install b/raid-check-systemd.install
new file mode 100644
index 000000000000..26d9422be49f
--- /dev/null
+++ b/raid-check-systemd.install
@@ -0,0 +1,10 @@
+post_install() {
+ echo ""
+ echo ""
+ echo "To use this package, enable raid-check.timer with systemd."
+ echo "Default options run at (first Monday of each month at 08:00)"
+ echo ""
+ echo "To override defaults copy timer file and modify:"
+ ehco "/usr/lib/systemd/system/raid-check.timer --> /etc/systemd/system/raid-check.timer"
+ echo "Modifications made to the timer in /usr/lib/systemd will be overwritten."
+ }
diff --git a/raid-check.service b/raid-check.service
new file mode 100644
index 000000000000..37e9aa331a7c
--- /dev/null
+++ b/raid-check.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=raid-check
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/raid-check
diff --git a/raid-check.timer b/raid-check.timer
new file mode 100644
index 000000000000..e14934ca9f9b
--- /dev/null
+++ b/raid-check.timer
@@ -0,0 +1,11 @@
+# By default this timer will run the first Monday of each month at 08:00 AM.
+
+[Unit]
+Description=Run periodic raid volume scrub
+
+[Timer]
+OnCalendar=Mon *-*-1,2,3,4,5,6,7 08:00:00
+Persistent=true
+
+[Install]
+WantedBy=timers.target