]> git.sev.monster Git - aports.git/commitdiff
testing/cronwrap: new aport
authorsev <git@sev.monster>
Thu, 5 Aug 2021 10:08:18 +0000 (05:08 -0500)
committersev <git@sev.monster>
Mon, 28 Oct 2024 22:10:09 +0000 (17:10 -0500)
testing/cronwrap/APKBUILD [new file with mode: 0644]
testing/cronwrap/cronwrap [new file with mode: 0644]

diff --git a/testing/cronwrap/APKBUILD b/testing/cronwrap/APKBUILD
new file mode 100644 (file)
index 0000000..13b4788
--- /dev/null
@@ -0,0 +1,19 @@
+# Contributor: sev <alpine@sev.monster>
+# Maintainer: sev <alpine@sev.monster>
+pkgname=cronwrap
+pkgver=1.0.0
+pkgrel=0
+pkgdesc="Pipe a command's output to a logfile with datestamps"
+url="https://git.sev.monster/aports.git"
+arch="noarch"
+license="WTFPL"
+source="cronwrap"
+options="!check"
+
+package() {
+       install -Dm755 cronwrap "$pkgdir"/usr/bin/cronwrap
+}
+
+sha512sums="
+1d89508f7b1683a802e1c3c09794e22c17ab26fec2c3ec7023c588b56a7ed609f111aed917fcd81af11df6c2ec832ca3fe196436cbf9eb609746c07552d46769  cronwrap
+"
diff --git a/testing/cronwrap/cronwrap b/testing/cronwrap/cronwrap
new file mode 100644 (file)
index 0000000..a0e501f
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -eu
+set -o pipefail
+
+"$@" 2>&1 \
+       | awk "{print strftime(\"%b %d %H:%M:%S `hostname -s` info $1[$$] \"), \$0; fflush();}" \
+       | tee -a "/var/log/$1.cron.log"
This page took 0.033522 seconds and 4 git commands to generate.