summaryrefslogtreecommitdiffstats
path: root/abs/extra/apcupsd/apcupsd.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2013-12-04 20:25:28 (GMT)
committerBritney Fransen <brfransen@gmail.com>2013-12-04 20:25:28 (GMT)
commitdacae1d9673958dbeceae2ec93758cc3d4b9995e (patch)
treec563a7740326a95663ca3f0dc624108591e28cdb /abs/extra/apcupsd/apcupsd.install
parent1a88a6987070019e4901e7da132de64ff32d0694 (diff)
downloadlinhes_pkgbuild-dacae1d9673958dbeceae2ec93758cc3d4b9995e.zip
linhes_pkgbuild-dacae1d9673958dbeceae2ec93758cc3d4b9995e.tar.gz
linhes_pkgbuild-dacae1d9673958dbeceae2ec93758cc3d4b9995e.tar.bz2
apcupsd: readd for R8. closes#949.
runit-scripts: add apcupsd
Diffstat (limited to 'abs/extra/apcupsd/apcupsd.install')
-rw-r--r--abs/extra/apcupsd/apcupsd.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/abs/extra/apcupsd/apcupsd.install b/abs/extra/apcupsd/apcupsd.install
new file mode 100644
index 0000000..3f1e6b2
--- /dev/null
+++ b/abs/extra/apcupsd/apcupsd.install
@@ -0,0 +1,24 @@
+# This is a default template for a post-install scriptlet. You can
+# remove any functions you don't need (and this header).
+
+# arg 1: the new package version
+post_install() {
+ add_service.sh apcupsd
+ /sbin/sv start apcupsd
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+}
+
+# arg 1: the old package version
+post_remove() {
+ /sbin/sv stop apcupsd
+ remove_service.sh apcupsd
+}
+
+op=$1
+shift
+$op $*