[monit: 12/17] Move configuration file to upstream's default location after install since we dropped the patch that
Maxim Burgerhout
wzzrd at fedoraproject.org
Fri Dec 2 22:16:54 UTC 2011
commit d0ee2c9770301c95577dcffac561fc4c8744c89e
Author: Maxim Burgerhout <maxim at wzzrd.com>
Date: Sun Nov 13 21:51:01 2011 +0100
Move configuration file to upstream's default location after install since we
dropped the patch that changed this for Fedora
monit.spec | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/monit.spec b/monit.spec
index d35cf96..8253ded 100644
--- a/monit.spec
+++ b/monit.spec
@@ -72,10 +72,11 @@ rm -rf $RPM_BUILD_ROOT
if [ $1 -eq 1 ]; then
/bin/systemctl enable monit.service > /dev/null 2>&1 || :
fi
-if [ -f /etc/monit.conf ]; then
- mv /etc/monitrc /etc/monitrc.rpmnew
- mv /etc/monit.conf /etc/monitrc
-fi
+
+# Moving old style configuration file to upstream's default location
+[ -f %{_sysconfdir}/monit.conf ] &&
+ touch -r %{_sysconfdir}/monitrc %{_sysconfdir}/monit.conf &&
+ mv -f %{_sysconfdir}/monit.conf %{_sysconfdir}/monitrc 2> /dev/null || :
%preun
if [ $1 -eq 0 ]; then
More information about the scm-commits
mailing list