Browse Source

web directory

Bob Mottram 9 years ago
parent
commit
ab992fffd5
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      src/freedombone

+ 8
- 4
src/freedombone View File

@@ -8849,7 +8849,8 @@ function install_webmail {
8849 8849
         return
8850 8850
     fi
8851 8851
 
8852
-    WEBMAIL_PATH=/var/www/webmail
8852
+    WEB_PATH=/var/www
8853
+    WEBMAIL_PATH=$WEB_PATH/webmail
8853 8854
 
8854 8855
     # update to a new commit if needed
8855 8856
     set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO
@@ -8870,8 +8871,7 @@ function install_webmail {
8870 8871
     apt-get -y install php5-dev imagemagick php5-imagick
8871 8872
 
8872 8873
     if [ ! -f $WEBMAIL_PATH/index.php ]; then
8873
-        cd $WEBMAIL_PATH
8874
-        cd ..
8874
+        cd $WEB_PATH
8875 8875
         git_clone $WEBMAIL_REPO webmail
8876 8876
         cd $WEBMAIL_PATH
8877 8877
         git checkout $WEBMAIL_COMMIT -b $WEBMAIL_COMMIT
@@ -8882,7 +8882,11 @@ function install_webmail {
8882 8882
         fi
8883 8883
         chown -R www-data:www-data $WEBMAIL_PATH
8884 8884
     fi
8885
-
8885
+    if [ ! -f $WEBMAIL_PATH/index.php ]; then
8886
+        echo $'Did not clone webmail repo'
8887
+        exit 52825
8888
+    fi
8889
+    
8886 8890
     WEBMAIL_ONION_HOSTNAME=
8887 8891
     if [[ $ONION_ONLY != "no" ]]; then
8888 8892
         WEBMAIL_ONION_HOSTNAME=$(add_onion_service webmail 80 ${WEBMAIL_ONION_PORT})