From f81a4409162bcec4aca2d8a10fa25d78c9fa5cae Mon Sep 17 00:00:00 2001 From: iridiumR Date: Mon, 7 Aug 2023 21:20:44 +0800 Subject: [PATCH] add systemd unit and PKGBUILD --- PKGBUILD | 20 ++++++++++++++++++++ uptimesd.service | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 PKGBUILD create mode 100644 uptimesd.service diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..12e5034 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: 1ridic +pkgname=uptimes +pkgver=0.1.0 +pkgrel=1 +pkgdesc="status of total uptime" +arch=('any') +url="" +license=('unknown') +depends=('python') +source=( + local://uptimes + local://uptimesd.service +) +md5sums=('b2bac26fc929e533923497311f4de415' + 'f598fdb7ab331933d3495c0bb53358c2') + +package() { + install -Dm755 uptimes "$pkgdir/usr/bin/uptimes" + install -Dm644 uptimesd.service "$pkgdir/usr/lib/systemd/system/uptimes.service" +} diff --git a/uptimesd.service b/uptimesd.service new file mode 100644 index 0000000..d9e3e2a --- /dev/null +++ b/uptimesd.service @@ -0,0 +1,10 @@ +[Unit] +Description=uptimes: status of total uptime +After=network.target network-online.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/uptimes --daemon +[Install] +WantedBy=multi-user.target \ No newline at end of file