[freeside-commits] branch master updated. d7d595017893aa3c4ffa23ca56d85de1dd68e5ed
Ivan Kohler
ivan at freeside.biz
Mon Jul 15 13:05:16 AKDT 2024
The branch, master has been updated
via d7d595017893aa3c4ffa23ca56d85de1dd68e5ed (commit)
from 400a6a7ef33be86a658c9b18ebd66acd65a0e9af (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 d7d595017893aa3c4ffa23ca56d85de1dd68e5ed
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 7055c292b..3a6012849 100644
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,6 @@ HTTPD_RESTART = /etc/init.d/apache2 restart
#(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
#debian unstable/8.0+, apache2.4
APACHE_CONF = /etc/apache2/conf-available
-INSSERV_OVERRIDE = /etc/insserv/overrides
FREESIDE_RESTART = ${INIT_FILE} restart
@@ -292,7 +291,8 @@ install-apache:
[ -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
index 550c17514..216d42de8 100644
--- a/debian/freeside-webui.dirs
+++ b/debian/freeside-webui.dirs
@@ -1 +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 c5ea87978..50bdff2db 100644
--- a/debian/freeside-webui.postinst
+++ b/debian/freeside-webui.postinst
@@ -8,8 +8,7 @@ rm -fr /usr/local/etc/freeside/masondata/*
/usr/sbin/a2enmod mpm_prefork
#/usr/sbin/service restart apache2
-#XXX systemd equivalent (start apache after postgres)
-/sbin/insserv -d
+/usr/bin/systemctl daemon-reload
exit 0
diff --git a/debian/rules b/debian/rules
index 88a0dfb97..928e589eb 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 $(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 | 4 ++--
debian/freeside-webui.dirs | 1 +
debian/freeside-webui.postinst | 3 +--
debian/rules | 4 ++--
init.d/insserv-override-apache2 | 11 -----------
init.d/systemd-apache-override.conf | 2 ++
6 files changed, 8 insertions(+), 17 deletions(-)
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