forked from ISTI-ansible-roles/ansible-roles
Add a random seep before restarting the postgresql and pgpool services after a certificate renewal. See https://support.d4science.org/issues/10229
This commit is contained in:
parent
38554c6692
commit
fd700fe28c
|
@ -26,8 +26,10 @@ chgrp postgres ${PGPOOL2_KEYFILE}
|
|||
|
||||
echo "Reload the pgpool2 service" >> $LE_LOG_DIR/pgpool2.log
|
||||
if [ -x /bin/systemctl ] ; then
|
||||
sleep $RANDOM
|
||||
systemctl reload pgpool2 >> $LE_LOG_DIR/pgpool2.log 2>&1
|
||||
else
|
||||
sleep $RANDOM
|
||||
service pgpool2 reload >> $LE_LOG_DIR/pgpool2.log 2>&1
|
||||
fi
|
||||
|
||||
|
|
|
@ -24,10 +24,12 @@ chmod 440 ${POSTGRESQL_KEYFILE}
|
|||
chown root ${POSTGRESQL_KEYFILE}
|
||||
chgrp postgres ${POSTGRESQL_KEYFILE}
|
||||
|
||||
echo "Reload the postgresql service" >> $LE_LOG_DIR/postgresql.log
|
||||
echo "Restart the postgresql service" >> $LE_LOG_DIR/postgresql.log
|
||||
if [ -x /bin/systemctl ] ; then
|
||||
sleep $RANDOM
|
||||
systemctl restart postgresql >> $LE_LOG_DIR/postgresql.log 2>&1
|
||||
else
|
||||
sleep $RANDOM
|
||||
service postgresql restart >> $LE_LOG_DIR/postgresql.log 2>&1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue