瀏覽代碼

web directory

Bob Mottram 9 年之前
父節點
當前提交
ab992fffd5
共有 1 個檔案被更改,包括 8 行新增4 行删除
  1. 8
    4
      src/freedombone

+ 8
- 4
src/freedombone 查看文件

8849
         return
8849
         return
8850
     fi
8850
     fi
8851
 
8851
 
8852
-    WEBMAIL_PATH=/var/www/webmail
8852
+    WEB_PATH=/var/www
8853
+    WEBMAIL_PATH=$WEB_PATH/webmail
8853
 
8854
 
8854
     # update to a new commit if needed
8855
     # update to a new commit if needed
8855
     set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO
8856
     set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO
8870
     apt-get -y install php5-dev imagemagick php5-imagick
8871
     apt-get -y install php5-dev imagemagick php5-imagick
8871
 
8872
 
8872
     if [ ! -f $WEBMAIL_PATH/index.php ]; then
8873
     if [ ! -f $WEBMAIL_PATH/index.php ]; then
8873
-        cd $WEBMAIL_PATH
8874
-        cd ..
8874
+        cd $WEB_PATH
8875
         git_clone $WEBMAIL_REPO webmail
8875
         git_clone $WEBMAIL_REPO webmail
8876
         cd $WEBMAIL_PATH
8876
         cd $WEBMAIL_PATH
8877
         git checkout $WEBMAIL_COMMIT -b $WEBMAIL_COMMIT
8877
         git checkout $WEBMAIL_COMMIT -b $WEBMAIL_COMMIT
8882
         fi
8882
         fi
8883
         chown -R www-data:www-data $WEBMAIL_PATH
8883
         chown -R www-data:www-data $WEBMAIL_PATH
8884
     fi
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
     WEBMAIL_ONION_HOSTNAME=
8890
     WEBMAIL_ONION_HOSTNAME=
8887
     if [[ $ONION_ONLY != "no" ]]; then
8891
     if [[ $ONION_ONLY != "no" ]]; then
8888
         WEBMAIL_ONION_HOSTNAME=$(add_onion_service webmail 80 ${WEBMAIL_ONION_PORT})
8892
         WEBMAIL_ONION_HOSTNAME=$(add_onion_service webmail 80 ${WEBMAIL_ONION_PORT})