Try to fix pep breakage

This commit is contained in:
Bob Mottram 2017-05-28 15:18:41 +01:00
parent 8791750811
commit 4cdef3f52a
1 changed files with 7 additions and 3 deletions

View File

@ -343,10 +343,14 @@ function update_prosody_modules {
fi
# change to using pep rather than profile modules
if grep '"profile"' /etc/prosody/prosody.cfg.lua; then
systemctl stop prosody
if grep '"pep"' /etc/prosody/prosody.cfg.lua; then
# This strange dance seems to fix occasional breakage of PEP
# Is there a better solution?
sed -i 's|"pep"|"profile"|g' /etc/prosody/prosody.cfg.lua
systemctl restart prosody
sleep 4
sed -i 's|"profile"|"pep"|g' /etc/prosody/prosody.cfg.lua
systemctl start prosody
systemctl restart prosody
fi
if ! grep '"vcard"' /etc/prosody/prosody.cfg.lua; then
systemctl stop prosody