]> git.pld-linux.org Git - packages/apcupsd.git/blobdiff - systemd.patch
add fedora patches; including systemd support
[packages/apcupsd.git] / systemd.patch
diff --git a/systemd.patch b/systemd.patch
new file mode 100644 (file)
index 0000000..755fff2
--- /dev/null
@@ -0,0 +1,28 @@
+diff -up apcupsd-3.14.8/apcupsd.service.systemd apcupsd-3.14.8/apcupsd.service
+--- apcupsd-3.14.8/apcupsd.service.systemd     2011-06-16 10:33:02.335889489 +0200
++++ apcupsd-3.14.8/apcupsd.service     2011-06-16 09:59:02.616138047 +0200
+@@ -0,0 +1,11 @@
++[Unit]
++Description=APC UPS Power Control Daemon for Linux
++After=syslog.target
++After=network.target
++
++[Service]
++ExecStartPre=-/bin/rm -f /etc/apcupsd/powerfail
++ExecStart=/usr/sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
++
++[Install]
++WantedBy=multi-user.target
+diff -up apcupsd-3.14.8/apcupsd_shutdown.systemd apcupsd-3.14.8/apcupsd_shutdown
+--- apcupsd-3.14.8/apcupsd_shutdown.systemd    2011-06-16 10:33:08.831934420 +0200
++++ apcupsd-3.14.8/apcupsd_shutdown    2011-06-16 10:10:20.948796784 +0200
+@@ -0,0 +1,9 @@
++#!/bin/sh
++
++# See if this is a powerfail situation.
++if [ -f /etc/apcupsd/powerfail ]; then
++  echo
++  echo "APCUPSD will now power off the UPS"
++  echo
++  /etc/apcupsd/apccontrol killpower
++fi
This page took 0.081673 seconds and 4 git commands to generate.