Ver Fonte

Add demo mode check to func/main.sh

Kristan Kenney há 6 anos atrás
pai
commit
bec38b4819
1 ficheiros alterados com 8 adições e 0 exclusões
  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
+}