run systemd-tmpfiles in %post to work after installation [release 2.4.9-4mamba;Sun May 25 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 20:27:07 +01:00
parent e9507f8592
commit 143365290c

View File

@ -5,7 +5,7 @@
Name: apache
Version: 2.4.9
Release: 3mamba
Release: 4mamba
Epoch: 1
Summary: The Apache webserver
Group: System/Servers
@ -284,7 +284,7 @@ fi
exit 0
%post
systemctl daemon-reload
/sbin/ldconfig
# new install
if [ $1 -eq 1 ]; then
# do configuration stuff
@ -294,12 +294,13 @@ if [ $1 -eq 1 ]; then
install -d %{_sysconfdir}/qmail/alias/
echo "root" > %{_sysconfdir}/qmail/alias/.qmail-webmaster
fi
systemctl enable httpd
fi
if [ $1 -ge 1 ]; then
apxs -e -a -n slotmem_shm %{_libdir}/apache/mod_slotmem_shm.so
sed -i "s|Include[[:space:]]\(/etc/httpd/httpd\.d/\*\.conf\)|IncludeOptional \1|" %{_sysconfdir}/httpd/httpd.conf
systemd-tmpfiles --create httpd.conf
systemctl -q daemon-reload
fi
if [ $1 -eq 2 ]; then
@ -308,8 +309,14 @@ if [ $1 -eq 2 ]; then
echo "
Include %{_sysconfdir}/httpd/httpd.d/*.conf" >> %{_sysconfdir}/httpd/httpd.conf
fi
/sbin/ldconfig
systemctl try-restart httpd
if [ $1 -gt 1 ]; then
systemctl -q try-restart httpd
elif [ $1 -eq 1 ]; then
systemctl -q enable httpd
systemctl -q start httpd
fi
exit 0
%preun
@ -338,7 +345,8 @@ exit 0
if [ $1 -eq 1 ]; then
#install
apxs -e -a -n suexec %{_libdir}/apache/mod_suexec.so
systemctl reload-or-try-restart httpd
systemctl -q daemon-reload
systemctl -q reload-or-try-restart httpd
fi
exit 0
@ -423,6 +431,9 @@ exit 0
%{_libdir}/apache/mod_suexec.so
%changelog
* Sun May 25 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.9-4mamba
- run systemd-tmpfiles in %post to work after installation
* Sat May 03 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.9-3mamba
- x86_64: move tmpfiles.d/httpd.conf from %{_libdir} to %{_prefix}/lib