diff --git a/scripts/start.sh b/scripts/start.sh index ac963823..fb67efc4 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -127,8 +127,11 @@ if [[ "${NGINX_PORT}" != "80" ]] && [[ "${DOMAIN}" != "tipi.localhost" ]]; then exit 1 fi +# Run system-info.sh +echo "Running system-info.sh..." +"${ROOT_FOLDER}/scripts/system-info.sh" + kill_watcher -chmod -R a+rwx "${ROOT_FOLDER}/state/system-info.json" "${ROOT_FOLDER}/scripts/watcher.sh" & # Copy the config sample if it isn't here @@ -217,10 +220,6 @@ done mv -f "$ENV_FILE" "$ROOT_FOLDER/.env" -# Run system-info.sh -echo "Running system-info.sh..." -bash "${ROOT_FOLDER}/scripts/system-info.sh" - ## Don't run if config-only if [[ ! $ci == "true" ]]; then diff --git a/scripts/system-info.sh b/scripts/system-info.sh index 4e882ff0..9c00bd0b 100755 --- a/scripts/system-info.sh +++ b/scripts/system-info.sh @@ -32,3 +32,4 @@ echo '{ "cpu": { "load": '"${CPU_LOAD_PERCENTAGE}"' }, "memory": { "total": '"${ # Write to state file cat "${TEMP_JSON_FILE}" >"${STATE_FOLDER}/system-info.json" +chmod -R a+rwx "${ROOT_FOLDER}/state/system-info.json"