浏览代码

Check that microblog config file exists

Bob Mottram 9 年前
父节点
当前提交
674b3f010c
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7
    1
      src/freedombone

+ 7
- 1
src/freedombone 查看文件

@@ -8532,8 +8532,14 @@ function install_gnu_social {
8532 8532
         exit 72357
8533 8533
     fi
8534 8534
 
8535
-    # Some useful settings
8535
+    # check microblog has a config file
8536 8536
     microblog_config_file=/var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php
8537
+    if [ ! -f $microblog_config_file ]; then
8538
+        echo $'Microblog config.php not found'
8539
+        exit 87586
8540
+    fi
8541
+
8542
+    # Some useful settings
8537 8543
     if ! grep -q "Recommended GNU social settings" $microblog_config_file; then
8538 8544
         echo "" >> $microblog_config_file
8539 8545
         echo "// Recommended GNU social settings" >> $microblog_config_file