clear left-over pgpool sockets in /tmp
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 30 Aug 2017 09:57:49 +0000 (11:57 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 30 Aug 2017 09:57:49 +0000 (11:57 +0200)
This prevents startup of pgpool after unclean crush

Makefile

index f45b7a6..75ee118 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,8 +51,8 @@ push-pg:
 restart:
        #ssh root@10.200.1.61 systemctl restart postgresql-9.6
        #ssh root@10.200.1.62 systemctl restart postgresql-9.6
-       ssh root@10.200.1.61 'rm -v /var/log/pgpool/pgpool_status ; systemctl restart pgpool'
-       ssh root@10.200.1.62 'rm -v /var/log/pgpool/pgpool_status ; systemctl restart pgpool'
+       ssh root@10.200.1.61 'systemctl stop pgpool ; rm -v /var/log/pgpool/pgpool_status /tmp/.s.PGSQL.9* ; systemctl start pgpool'
+       ssh root@10.200.1.62 'systemctl stop pgpool ; rm -v /var/log/pgpool/pgpool_status /tmp/.s.PGSQL.9* ; systemctl start pgpool'
 
 status:
        ssh root@10.200.1.61 systemctl status pgpool