Create prosody modules directory if needed

This commit is contained in:
Bob Mottram 2017-05-15 17:53:46 +01:00
parent b3432a467e
commit 13d0998a8a
1 changed files with 6 additions and 0 deletions

View File

@ -320,6 +320,9 @@ function update_prosody_modules {
tar -xzvf $prosody_modules_filename
if [ -d prosody-modules ]; then
systemctl stop prosody
if [ ! -d /var/lib/prosody/prosody-modules ]; then
mkdir /var/lib/prosody/prosody-modules
fi
cp -r prosody-modules/* /var/lib/prosody/prosody-modules
chown -R prosody:prosody /var/lib/prosody/prosody-modules
systemctl start prosody
@ -876,6 +879,9 @@ function install_xmpp_main {
# install modules
update_prosody_modules initial
if [ ! -d /var/lib/prosody/prosody-modules ]; then
echo $'No prosody modules available'
fi
# create a certificate
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then