run systemd-tmpfiles in %post to work after installation [release 2.4.9-4mamba;Sun May 25 2014]
This commit is contained in:
parent
e9507f8592
commit
143365290c
23
apache.spec
23
apache.spec
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name: apache
|
Name: apache
|
||||||
Version: 2.4.9
|
Version: 2.4.9
|
||||||
Release: 3mamba
|
Release: 4mamba
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: The Apache webserver
|
Summary: The Apache webserver
|
||||||
Group: System/Servers
|
Group: System/Servers
|
||||||
@ -284,7 +284,7 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
systemctl daemon-reload
|
/sbin/ldconfig
|
||||||
# new install
|
# new install
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
# do configuration stuff
|
# do configuration stuff
|
||||||
@ -294,12 +294,13 @@ if [ $1 -eq 1 ]; then
|
|||||||
install -d %{_sysconfdir}/qmail/alias/
|
install -d %{_sysconfdir}/qmail/alias/
|
||||||
echo "root" > %{_sysconfdir}/qmail/alias/.qmail-webmaster
|
echo "root" > %{_sysconfdir}/qmail/alias/.qmail-webmaster
|
||||||
fi
|
fi
|
||||||
systemctl enable httpd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
apxs -e -a -n slotmem_shm %{_libdir}/apache/mod_slotmem_shm.so
|
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
|
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
|
fi
|
||||||
|
|
||||||
if [ $1 -eq 2 ]; then
|
if [ $1 -eq 2 ]; then
|
||||||
@ -308,8 +309,14 @@ if [ $1 -eq 2 ]; then
|
|||||||
echo "
|
echo "
|
||||||
Include %{_sysconfdir}/httpd/httpd.d/*.conf" >> %{_sysconfdir}/httpd/httpd.conf
|
Include %{_sysconfdir}/httpd/httpd.d/*.conf" >> %{_sysconfdir}/httpd/httpd.conf
|
||||||
fi
|
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
|
exit 0
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
@ -338,7 +345,8 @@ exit 0
|
|||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
#install
|
#install
|
||||||
apxs -e -a -n suexec %{_libdir}/apache/mod_suexec.so
|
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
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
@ -423,6 +431,9 @@ exit 0
|
|||||||
%{_libdir}/apache/mod_suexec.so
|
%{_libdir}/apache/mod_suexec.so
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- x86_64: move tmpfiles.d/httpd.conf from %{_libdir} to %{_prefix}/lib
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user