Try without the pep dance
This commit is contained in:
parent
c80feb6768
commit
d3b3bd1d9b
|
@ -94,7 +94,7 @@ function xmpp_add_onion_address {
|
|||
if [ ${#onion_address} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
if ! grep "[\"${domain_name}\"] = \"${onion_address}\";" /etc/prosody/prosody.cfg.lua; then
|
||||
if ! grep "${onion_address}" /etc/prosody/prosody.cfg.lua; then
|
||||
if grep -q "[\"${domain_name}\"]" /etc/prosody/prosody.cfg.lua; then
|
||||
sed -i "s|[\"${domain_name}\"].*|[\"${domain_name}\"] = \"${onion_address}\";|g" /etc/prosody/prosody.cfg.lua
|
||||
else
|
||||
|
@ -138,14 +138,19 @@ function xmpp_remove_onion_address {
|
|||
if [ ${#domain_name} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
xmpp_changed=
|
||||
if grep -q "[\"${domain_name}\"]" /etc/prosody/prosody.cfg.lua; then
|
||||
sed -i "/[\"${domain_name}\"]/d" /etc/prosody/prosody.cfg.lua
|
||||
xmpp_changed=1
|
||||
fi
|
||||
|
||||
if grep -q "= \"${domain_name}\";" /etc/prosody/prosody.cfg.lua; then
|
||||
sed -i "/= \"${domain_name}\";/d" /etc/prosody/prosody.cfg.lua
|
||||
xmpp_changed=1
|
||||
fi
|
||||
if [ $xmpp_changed ]; then
|
||||
systemctl restart prosody
|
||||
fi
|
||||
systemctl restart prosody
|
||||
}
|
||||
|
||||
function xmpp_remove_onion_address_interactive {
|
||||
|
@ -361,16 +366,6 @@ function update_prosody_modules {
|
|||
fi
|
||||
fi
|
||||
|
||||
# change to using pep rather than profile modules
|
||||
if grep -q '"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 restart prosody
|
||||
fi
|
||||
if ! grep -q '"vcard"' /etc/prosody/prosody.cfg.lua; then
|
||||
systemctl stop prosody
|
||||
sed -i '/"pep"/a "vcard";' /etc/prosody/prosody.cfg.lua
|
||||
|
|
Loading…
Reference in New Issue