From 980320f9e5bbac44147aecf9eef07a3e115aa97d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 21 Jan 2018 10:10:43 +0000 Subject: [PATCH] Only copy prosody modules if the directory exists --- src/freedombone-utils-web | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index bbf057c6..697f0853 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -815,7 +815,9 @@ function update_default_domain { chown -R prosody:default /etc/prosody chmod -R 700 /etc/prosody/certs/* chmod 600 /etc/prosody/prosody.cfg.lua - cp -r $INSTALL_DIR/prosody-modules/* /var/lib/prosody/prosody-modules/ + if [ -d $INSTALL_DIR/prosody-modules ]; then + cp -r $INSTALL_DIR/prosody-modules/* /var/lib/prosody/prosody-modules/ + fi chown -R prosody:prosody /var/lib/prosody/prosody-modules systemctl reload prosody fi