summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Henson2018-11-29 15:55:14 -0700
committerJeff Henson2018-11-29 15:55:14 -0700
commitd1ccddfc496430cc6e0321c5e652b4f49a00f6ab (patch)
treebc34115d7c54cea66049636cfff8c1446ec0ae14
parentbfdd7142a7857ba1e5079a69658e2cbe366a7838 (diff)
downloadaur-d1ccddfc496430cc6e0321c5e652b4f49a00f6ab.tar.gz
Add required power scripts
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD19
-rwxr-xr-xhibernate.sh2
-rwxr-xr-xshutdown.sh2
4 files changed, 27 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f2289d19ed0..290a76fc0a1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = powerpanel
pkgdesc = CyberPower UPS daemon
pkgver = 1.3.2
- pkgrel = 7
+ pkgrel = 8
url = https://www.cyberpowersystems.com/product/software/powerpanel-for-linux/
arch = x86_64
arch = i686
@@ -10,10 +10,16 @@ pkgbase = powerpanel
backup = etc/powerpanel/pwrstatd-powerfail.sh
backup = etc/powerpanel/pwrstatd-lowbatt.sh
backup = etc/powerpanel/pwrstatd-email.sh
+ backup = etc/powerpanel/hibernate.sh
+ backup = etc/powerpanel/shutdown.sh
backup = etc/pwrstatd.conf
source = pwrstatd.service
+ source = hibernate.sh
+ source = shutdown.sh
source = https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-132-x86_64.tar.gz
sha256sums = 255e5958346daa9d7c0e96ae3d86095afd3b3ec99880205d15d51b8f20a602df
+ sha256sums = c710ea7765a24fb469adf601f44c8d3857634336bdfc263434ce86c3d67a4a80
+ sha256sums = 10badc96b0ac990959ddc53d1d1cbba6b904e648b54d0eea085194e48d6a0998
sha256sums = 265099590e82303fa1082a84dda02488d41762ca5b94f2bb7fd395c9b4ac1c36
pkgname = powerpanel
diff --git a/PKGBUILD b/PKGBUILD
index 40616def2d7..4e254ae6095 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,17 +3,22 @@
pkgname=powerpanel
pkgver=1.3.2
_pkgverdl=132
-pkgrel=7
+pkgrel=8
pkgdesc="CyberPower UPS daemon"
arch=("x86_64" "i686")
url="https://www.cyberpowersystems.com/product/software/powerpanel-for-linux/"
license=("custom:CyberPower")
depends=('libusb')
backup=(etc/powerpanel/pwrstatd-{powerfail,lowbatt,email}.sh
+ etc/powerpanel/{hibernate,shutdown}.sh
etc/pwrstatd.conf)
-source=('pwrstatd.service')
-sha256sums=('255e5958346daa9d7c0e96ae3d86095afd3b3ec99880205d15d51b8f20a602df')
+source=('pwrstatd.service'
+ 'hibernate.sh'
+ 'shutdown.sh')
+sha256sums=('255e5958346daa9d7c0e96ae3d86095afd3b3ec99880205d15d51b8f20a602df'
+ 'c710ea7765a24fb469adf601f44c8d3857634336bdfc263434ce86c3d67a4a80'
+ '10badc96b0ac990959ddc53d1d1cbba6b904e648b54d0eea085194e48d6a0998')
if [[ $CARCH = 'x86_64' ]]; then
source+=("https://dl4jz3rbrsfum.cloudfront.net/software/powerpanel-$_pkgverdl-x86_64.tar.gz")
@@ -49,6 +54,14 @@ package() {
# Script command for e-mail notification
install -Dm755 script/pwrstatd-email.sh "${pkgdir}/etc/powerpanel/pwrstatd-email.sh"
+ # Script for hibernate support
+ install -Dm755 "${srcdir}/hibernate.sh" "${pkgdir}/etc/powerpanel/hibernate.sh"
+ ln -s powerpanel/hibernate.sh "${pkgdir}/etc/hibernate.sh"
+
+ # Script for shutdown support
+ install -Dm755 "${srcdir}/shutdown.sh" "${pkgdir}/etc/powerpanel/shutdown.sh"
+ ln -s powerpanel/shutdown.sh "${pkgdir}/etc/shutdown.sh"
+
# Systemd unit
install -Dm644 "${srcdir}/pwrstatd.service" "${pkgdir}/usr/lib/systemd/system/pwrstatd.service"
diff --git a/hibernate.sh b/hibernate.sh
new file mode 100755
index 00000000000..ea581e0eec7
--- /dev/null
+++ b/hibernate.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+systemctl hibernate
diff --git a/shutdown.sh b/shutdown.sh
new file mode 100755
index 00000000000..949e4243831
--- /dev/null
+++ b/shutdown.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+systemctl poweroff