From 9f9595a81c1bc738c8701bd4c7595765ccf3753d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 17 Nov 2017 17:45:23 +0200 Subject: 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. --- INSTALL | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'INSTALL') 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 -- cgit v1.1