diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-11-17 17:45:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-11-17 17:45:23 +0200 |
commit | 9f9595a81c1bc738c8701bd4c7595765ccf3753d (patch) | |
tree | 884aecdcff58d97073f4d9fba6f6eb18e6e9802e | |
parent | ef2646010039b04ccf882ea3480882fa1e43a1fc (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.
-rw-r--r-- | INSTALL | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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 |