[freeside-commits] branch FREESIDE_3_BRANCH updated. d548885dc9653d835cee87ec70f9fc4868def482
Ivan Kohler
ivan at freeside.biz
Mon Jul 15 13:26:22 AKDT 2024
The branch, FREESIDE_3_BRANCH has been updated
via d548885dc9653d835cee87ec70f9fc4868def482 (commit)
from 79b9e352c852cf4b7712b69bbbd29f17e5c1e053 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d548885dc9653d835cee87ec70f9fc4868def482
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Jul 15 14:04:10 2024 -0700
systemd: start apache after postgresql
diff --git a/Makefile b/Makefile
index 54417474c..7774754fe 100644
--- a/Makefile
+++ b/Makefile
@@ -77,13 +77,8 @@ HTTPD_RESTART = /etc/init.d/apache2 restart
#HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
#(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
-#deb (3.1+), apache2
-#APACHE_CONF = /etc/apache2/conf.d
#debian unstable/8.0+, apache2.4
-#APACHE_CONF = /etc/apache2/conf-available
-APACHE_CONF := $(shell [ ${APACHE_VERSION} = '2.4' ] && echo '/etc/apache2/conf-available' || echo '/etc/apache2/conf.d')
-
-INSSERV_OVERRIDE = /etc/insserv/overrides
+APACHE_CONF = /etc/apache2/conf-available
FREESIDE_RESTART = ${INIT_FILE} restart
@@ -300,10 +295,11 @@ install-apache:
s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
" ${APACHE_CONF}/freeside-*.conf \
) || true
- [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
- [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
+ [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base2.4 ) || true
+ [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
[ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
- [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
+ [ -x /usr/sbin/systemctl ] && mkdir /etc/systemd/system/apache.d/ || true
+ [ -x /usr/sbin/systemctl ] && ( install -o root -m 755 init.d/systemd-apache-override.conf /etc/systemd/system/apache2.d/override.conf && /usr/sbin/systemctl daemon-reload ) || true
install-selfservice:
[ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside
diff --git a/debian/freeside-webui.dirs b/debian/freeside-webui.dirs
new file mode 100644
index 000000000..216d42de8
--- /dev/null
+++ b/debian/freeside-webui.dirs
@@ -0,0 +1,2 @@
+/usr/local/etc/freeside/profile
+/etc/systemd/system/apache2.d
diff --git a/debian/freeside-webui.postinst b/debian/freeside-webui.postinst
index 8dd2baaf5..50bdff2db 100644
--- a/debian/freeside-webui.postinst
+++ b/debian/freeside-webui.postinst
@@ -3,8 +3,12 @@
chown -R freeside /usr/local/etc/freeside
rm -fr /usr/local/etc/freeside/masondata/*
-#XXX systemd equivalent (start apache after postgres)
-/sbin/insserv -d
+/usr/sbin/a2dismod mpm_event || /bin/true
+/usr/sbin/a2dismod mpm_worker || /bin/true
+/usr/sbin/a2enmod mpm_prefork
+#/usr/sbin/service restart apache2
+
+/usr/bin/systemctl daemon-reload
exit 0
diff --git a/debian/rules b/debian/rules
index 867324d27..ed8c6cac5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -133,7 +133,7 @@ install-stamp: build-stamp
install -d $(FREESIDE_DOCUMENT_ROOT)
install -d $(TMP)-webui/usr/local/etc/freeside/
- install -d $(TMP)-webui/etc/insserv/overrides/
+ install -d $(TMP)-webui/etc/systemd/system/apache2.d/
install -d $(TMP)/usr/local/etc/freeside/
install -d $(FREESIDE_CACHE)/masondata #MASONDATA
# install -d $(TMP)-lib/usr/bin
@@ -176,7 +176,7 @@ install-stamp: build-stamp
# Create Apache configurations
install -d $(APACHE_CONF)
$(MAKE) -e DESTDIR=$(APACHE_CONF) install-apache
- install -o root -m 755 init.d/insserv-override-apache2 $(TMP)-webui/etc/insserv/overrides/apache2
+ install -o root -m 755 init.d/systemd-apache-override.conf $(TMP)-webui/etc/systemd/system/apache2.d/override.conf
#Hack the build dir out of apache config
diff --git a/init.d/insserv-override-apache2 b/init.d/insserv-override-apache2
deleted file mode 100644
index 1b333e806..000000000
--- a/init.d/insserv-override-apache2
+++ /dev/null
@@ -1,11 +0,0 @@
-### BEGIN INIT INFO
-# Provides: apache2
-# Required-Start: $local_fs $remote_fs $network $syslog $named
-# Required-Stop: $local_fs $remote_fs $network $syslog $named
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# X-Interactive: true
-# Short-Description: Start/stop apache2 web server
-# Should-Start: postgresql mysql
-# Should-Stop: postgresql mysql
-### END INIT INFO
diff --git a/init.d/systemd-apache-override.conf b/init.d/systemd-apache-override.conf
new file mode 100644
index 000000000..ad478e133
--- /dev/null
+++ b/init.d/systemd-apache-override.conf
@@ -0,0 +1,2 @@
+[Unit]
+After=postgresql.service
-----------------------------------------------------------------------
Summary of changes:
Makefile | 14 +++++---------
debian/freeside-webui.dirs | 2 ++
debian/freeside-webui.postinst | 8 ++++++--
debian/rules | 4 ++--
init.d/insserv-override-apache2 | 11 -----------
init.d/systemd-apache-override.conf | 2 ++
6 files changed, 17 insertions(+), 24 deletions(-)
create mode 100644 debian/freeside-webui.dirs
delete mode 100644 init.d/insserv-override-apache2
create mode 100644 init.d/systemd-apache-override.conf
More information about the freeside-commits
mailing list