Skip to content
Snippets Groups Projects
Commit afe945c3 authored by Bob Mottram's avatar Bob Mottram
Browse files

Stop and restart prosody when modules are updated to avoid undefined behavior

parent b3825d16
No related branches found
No related tags found
No related merge requests found
......@@ -319,8 +319,10 @@ function update_prosody_modules {
fi
tar -xzvf $prosody_modules_filename
if [ -d prosody-modules ]; then
systemctl stop prosody
cp -r prosody-modules/* /var/lib/prosody/prosody-modules
chown -R prosody:prosody /var/lib/prosody/prosody-modules
systemctl start prosody
fi
fi
fi
......@@ -328,10 +330,14 @@ function update_prosody_modules {
# change to using pep rather than profile modules
if grep '"profile"' /etc/prosody/prosody.cfg.lua; then
systemctl stop prosody
sed -i 's|"profile"|"pep"|g' /etc/prosody/prosody.cfg.lua
systemctl start prosody
fi
if ! grep '"vcard"' /etc/prosody/prosody.cfg.lua; then
systemctl stop prosody
sed -i '/"pep"/a "vcard";' /etc/prosody/prosody.cfg.lua
systemctl start prosody
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment