Browse Source

Only copy prosody modules if the directory exists

Bob Mottram 7 years ago
parent
commit
980320f9e5
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/freedombone-utils-web

+ 3
- 1
src/freedombone-utils-web View File

@@ -815,7 +815,9 @@ function update_default_domain {
815 815
             chown -R prosody:default /etc/prosody
816 816
             chmod -R 700 /etc/prosody/certs/*
817 817
             chmod 600 /etc/prosody/prosody.cfg.lua
818
-            cp -r $INSTALL_DIR/prosody-modules/* /var/lib/prosody/prosody-modules/
818
+            if [ -d $INSTALL_DIR/prosody-modules ]; then
819
+                cp -r $INSTALL_DIR/prosody-modules/* /var/lib/prosody/prosody-modules/
820
+            fi
819 821
             chown -R prosody:prosody /var/lib/prosody/prosody-modules
820 822
             systemctl reload prosody
821 823
         fi