Stop and restart prosody when modules are updated to avoid undefined behavior
This commit is contained in:
parent
b3825d1602
commit
afe945c377
|
@ -319,8 +319,10 @@ function update_prosody_modules {
|
||||||
fi
|
fi
|
||||||
tar -xzvf $prosody_modules_filename
|
tar -xzvf $prosody_modules_filename
|
||||||
if [ -d prosody-modules ]; then
|
if [ -d prosody-modules ]; then
|
||||||
|
systemctl stop prosody
|
||||||
cp -r prosody-modules/* /var/lib/prosody/prosody-modules
|
cp -r prosody-modules/* /var/lib/prosody/prosody-modules
|
||||||
chown -R prosody:prosody /var/lib/prosody/prosody-modules
|
chown -R prosody:prosody /var/lib/prosody/prosody-modules
|
||||||
|
systemctl start prosody
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -328,10 +330,14 @@ function update_prosody_modules {
|
||||||
|
|
||||||
# change to using pep rather than profile modules
|
# change to using pep rather than profile modules
|
||||||
if grep '"profile"' /etc/prosody/prosody.cfg.lua; then
|
if grep '"profile"' /etc/prosody/prosody.cfg.lua; then
|
||||||
|
systemctl stop prosody
|
||||||
sed -i 's|"profile"|"pep"|g' /etc/prosody/prosody.cfg.lua
|
sed -i 's|"profile"|"pep"|g' /etc/prosody/prosody.cfg.lua
|
||||||
|
systemctl start prosody
|
||||||
fi
|
fi
|
||||||
if ! grep '"vcard"' /etc/prosody/prosody.cfg.lua; then
|
if ! grep '"vcard"' /etc/prosody/prosody.cfg.lua; then
|
||||||
|
systemctl stop prosody
|
||||||
sed -i '/"pep"/a "vcard";' /etc/prosody/prosody.cfg.lua
|
sed -i '/"pep"/a "vcard";' /etc/prosody/prosody.cfg.lua
|
||||||
|
systemctl start prosody
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue