Просмотр исходного кода

Add demo mode check to func/main.sh

Kristan Kenney 6 лет назад
Родитель
Сommit
bec38b4819
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      func/main.sh

+ 8 - 0
func/main.sh

@@ -1009,3 +1009,11 @@ download_file() {
     fi
   fi
 }
+
+check_hestia_demo_mode() {
+    demo_mode=$(grep DEMO_MODE /usr/local/hestia/conf/hestia.conf | cut -d '=' -f2 | sed "s|'||g")
+    if [ ! -z "$demo_mode" ] && [ "$demo_mode" = "yes" ]; then
+        echo "ERROR: Unable to perform operation when demo mode is enabled."
+        exit 1
+    fi
+}