Browse Source

Config values take effect immediately

Ernesto Nicolás Carrea 5 years ago
parent
commit
f48807729d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      func/osal.sh

+ 4 - 0
func/osal.sh

@@ -107,6 +107,10 @@ sed_escape() {
 osal_kv_write() { 
     osal_kv_delete "$1" "$2"
     echo "$2=$3" >> "$1"
+    if [ "$1" == "$HESTIA/conf/hestia.conf" ]; then
+        # Writing config value. Take effect immediately.
+        declare $2="$3"
+    fi
 }
 
 # Reads a value from a key-value file. # Exits successfully if it does.