aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-17 17:45:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-17 17:45:23 +0200
commit9f9595a81c1bc738c8701bd4c7595765ccf3753d (patch)
tree884aecdcff58d97073f4d9fba6f6eb18e6e9802e /INSTALL
parentef2646010039b04ccf882ea3480882fa1e43a1fc (diff)
Update INSTALL with how to automatically start apache when postgres is started
What we had now worked for restart but not for separate stop and start which is what happens, for example, when the postgresql package is upgraded. Now whenever the postgresql service is started, systemd will also try to start apache2.
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL15
1 files changed, 13 insertions, 2 deletions
diff --git a/INSTALL b/INSTALL
index cdb1663..4a364e4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -300,9 +300,20 @@ you can use 'systemctl edit' instead of mkdir and cat):
Requires=postgresql.service
After=postgresql.service
^D
+
+# mkdir -p /etc/systemd/system/postgresql.service.d/
+# cat >/etc/systemd/system/postgresql.service.d/apache2.conf
+[Unit]
+Wants=apache2.service
+^D
+
# systemctl daemon-reload
-# systemctl cat apache2 # Verify override is listed.
-# systemctl restart apache2 # Verify the service still works.
+# systemctl cat apache2 # Verify override is listed.
+# systemctl cat postgresql # Verify override is listed.
+# systemctl stop postgresql
+# systemctl status apache2 # Verify stopped.
+# systemctl start postgresql
+# systemctl status apache2 # Verify started.
7. Optimize CSS