add systemd unit and PKGBUILD

This commit is contained in:
iridiumR 2023-08-07 21:20:44 +08:00
parent b534d34b6c
commit f81a440916
No known key found for this signature in database
GPG key ID: 49735733EB1A32C8
2 changed files with 30 additions and 0 deletions

20
PKGBUILD Normal file
View file

@ -0,0 +1,20 @@
# Maintainer: 1ridic <i@8f.al>
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"
}

10
uptimesd.service Normal file
View file

@ -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