diff --git a/src/freedombone b/src/freedombone index c7daaed6..7e9f03cd 100755 --- a/src/freedombone +++ b/src/freedombone @@ -8849,7 +8849,8 @@ function install_webmail { return fi - WEBMAIL_PATH=/var/www/webmail + WEB_PATH=/var/www + WEBMAIL_PATH=$WEB_PATH/webmail # update to a new commit if needed set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO @@ -8870,8 +8871,7 @@ function install_webmail { apt-get -y install php5-dev imagemagick php5-imagick if [ ! -f $WEBMAIL_PATH/index.php ]; then - cd $WEBMAIL_PATH - cd .. + cd $WEB_PATH git_clone $WEBMAIL_REPO webmail cd $WEBMAIL_PATH git checkout $WEBMAIL_COMMIT -b $WEBMAIL_COMMIT @@ -8882,7 +8882,11 @@ function install_webmail { fi chown -R www-data:www-data $WEBMAIL_PATH fi - + if [ ! -f $WEBMAIL_PATH/index.php ]; then + echo $'Did not clone webmail repo' + exit 52825 + fi + WEBMAIL_ONION_HOSTNAME= if [[ $ONION_ONLY != "no" ]]; then WEBMAIL_ONION_HOSTNAME=$(add_onion_service webmail 80 ${WEBMAIL_ONION_PORT})