Add systemd service and update PKGBUILD

This commit is contained in:
Eduard Tolosa 2019-03-30 15:34:48 -05:00
parent eb9af4fc1a
commit 082f38d4af
2 changed files with 14 additions and 1 deletions

View file

@ -2,7 +2,7 @@
pkgname=powerman pkgname=powerman
pkgver=0.1.2 pkgver=0.1.2
pkgrel=1 pkgrel=2
pkgdesc='Power Management framework for Linux written in Rust..' pkgdesc='Power Management framework for Linux written in Rust..'
arch=('x86_64') arch=('x86_64')
url='https://gitlab.com/edu4rdshl/powerman' url='https://gitlab.com/edu4rdshl/powerman'
@ -14,4 +14,5 @@ package() {
cd "${pkgname}-${pkgver}" cd "${pkgname}-${pkgver}"
install -Dm 755 bin/"${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm 755 bin/"${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -Dm 644 ${pkgname}.service "${pkgdir}/usr/lib/systemd/system/"
} }

12
powerman.service Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=Check battery status and make actions based in arguments.
After=default.target
[Service]
Type=oneshot
ExecStart=/usr/bin/powerman 5 60 hibernate
KillMode=process
KillSignal=SIGINT
[Install]
WantedBy=default.target