Bläddra i källkod

Try to fix pep breakage

Bob Mottram 8 år sedan
förälder
incheckning
4cdef3f52a
1 ändrade filer med 7 tillägg och 3 borttagningar
  1. 7
    3
      src/freedombone-app-xmpp

+ 7
- 3
src/freedombone-app-xmpp Visa fil

343
     fi
343
     fi
344
 
344
 
345
     # change to using pep rather than profile modules
345
     # change to using pep rather than profile modules
346
-    if grep '"profile"' /etc/prosody/prosody.cfg.lua; then
347
-        systemctl stop prosody
346
+    if grep '"pep"' /etc/prosody/prosody.cfg.lua; then
347
+        # This strange dance seems to fix occasional breakage of PEP
348
+        # Is there a better solution?
349
+        sed -i 's|"pep"|"profile"|g' /etc/prosody/prosody.cfg.lua
350
+        systemctl restart prosody
351
+        sleep 4
348
         sed -i 's|"profile"|"pep"|g' /etc/prosody/prosody.cfg.lua
352
         sed -i 's|"profile"|"pep"|g' /etc/prosody/prosody.cfg.lua
349
-        systemctl start prosody
353
+        systemctl restart prosody
350
     fi
354
     fi
351
     if ! grep '"vcard"' /etc/prosody/prosody.cfg.lua; then
355
     if ! grep '"vcard"' /etc/prosody/prosody.cfg.lua; then
352
         systemctl stop prosody
356
         systemctl stop prosody