Source2: %{name}.logrotate
Source3: %{name}.sysconfig
Patch0: %{name}-configure.patch
-
+Patch1: control-config.patch
Patch2: format-security.patch
Patch3: shutdown.patch
Patch4: cxxld.patch
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: util-linux
-Requires: systemd-units >= 0.38
Requires: rc-scripts
+Requires: systemd-units >= 0.38
Requires(post): fileutils
Requires(post,preun): /sbin/chkconfig
Requires(post,preun,postun): systemd-units >= 38
%prep
%setup -q
%patch0 -p1
-
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# Try to define nice-level for running apcupsd
SERVICE_RUN_NICE_LEVEL="+5"
+# Options override for apccontrol tool.
+# These would be used by "hook" scripts
+
+# to whom send reports
+SYSADMIN=root
+
+# path to program to use for mail sending
+APCUPSD_MAIL="/bin/mail"
--- /dev/null
+--- apcupsd-3.14.13/platforms/apccontrol.in~ 2015-09-16 16:48:10.000000000 +0300
++++ apcupsd-3.14.13/platforms/apccontrol.in 2015-09-16 17:16:01.239002981 +0300
+@@ -27,6 +27,7 @@
+
+ export SYSADMIN=root
+ export APCUPSD_MAIL="@APCUPSD_MAIL@"
++[ -f /etc/sysconfig/apcupsd ] && . /etc/sysconfig/apcupsd
+ if [ -f $SCRIPTDIR/config ]; then . $SCRIPTDIR/config ; fi
+
+ #