summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Stengele2015-09-06 17:57:35 +0200
committerDennis Stengele2015-09-06 17:57:35 +0200
commit90fdaa4844b3e1e649fae6613a0a32a095482921 (patch)
tree581f8ddd55bf475513b1412cf252095f9b719dd8
downloadaur-90fdaa4844b3e1e649fae6613a0a32a095482921.tar.gz
Initial commit, version 2.1.00
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD35
-rw-r--r--tuptime.cron8
-rw-r--r--tuptime.service13
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ddf615e95bd1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = tuptime
+ pkgdesc = Report the historical and statistical running time of system
+ pkgver = 2.1.00
+ pkgrel = 1
+ url = https://github.com/rfrail3/tuptime
+ arch = any
+ license = GPL
+ depends = python2
+ depends = cron
+ source = tuptime-2.1.00.tar.gz::https://github.com/rfrail3/tuptime/archive/v2.1.00.tar.gz
+ source = tuptime.service
+ source = tuptime.cron
+ sha256sums = 67b53feb2b7d4751045e6dff1b6fb7d3d3c8725b821c4b5eeb7b6b849f70c22c
+ sha256sums = f7e106eb400fb3aa7ea5d0f8f5388d53cf38b054a9dae7e77268489c21e3a2f2
+ sha256sums = 54675450a0c0f8d300a380b8ab61ca7845da7da0f7985694d086eda1eb77b81a
+
+pkgname = tuptime
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7182fa2401f7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Dennis Stengele <d.stengele (at) derintendant (dot) de>
+pkgname=tuptime
+pkgver=2.1.00
+pkgrel=1
+pkgdesc="Report the historical and statistical running time of system"
+arch=('any')
+url="https://github.com/rfrail3/tuptime"
+license=('GPL')
+groups=()
+depends=( 'python2'
+ 'cron')
+makedepends=()
+optdepends=()
+provides=()
+conflicts=()
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+source=(" $pkgname-$pkgver.tar.gz::https://github.com/rfrail3/tuptime/archive/v$pkgver.tar.gz"
+ "tuptime.service"
+ "tuptime.cron")
+noextract=()
+sha256sums=('67b53feb2b7d4751045e6dff1b6fb7d3d3c8725b821c4b5eeb7b6b849f70c22c'
+ 'f7e106eb400fb3aa7ea5d0f8f5388d53cf38b054a9dae7e77268489c21e3a2f2'
+ '54675450a0c0f8d300a380b8ab61ca7845da7da0f7985694d086eda1eb77b81a')
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -Dm755 "latest/tuptime" "$pkgdir/usr/bin/tuptime"
+ install -Dm644 "$srcdir/tuptime.service" "$pkgdir/usr/lib/systemd/system/tuptime.service"
+ install -Dm644 "$srcdir/tuptime.cron" "$pkgdir/etc/cron.d/tuptime"
+}
diff --git a/tuptime.cron b/tuptime.cron
new file mode 100644
index 000000000000..0557cfc6eaa5
--- /dev/null
+++ b/tuptime.cron
@@ -0,0 +1,8 @@
+# /etc/cron.d/tuptime: crontab entrie for tuptime update.
+
+# Execute tuptime each hour for avoid loss time if system don't shutdown correctly.
+# NOTE: Decrease the execution time for increase the accuracity.
+
+MAILTO=root
+
+*/5 * * * * root if [ -x /usr/bin/tuptime ]; then /usr/bin/tuptime -x > /dev/null; fi
diff --git a/tuptime.service b/tuptime.service
new file mode 100644
index 000000000000..5fef7f4ca1cb
--- /dev/null
+++ b/tuptime.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Tuptime service
+After=local-fs.target
+Requires=local-fs.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/usr/bin/tuptime -x
+ExecStop=/usr/bin/tuptime -xg
+
+[Install]
+WantedBy=local-fs.target