fix: run system-info.sh before changing permissions [skip ci]

This commit is contained in:
Nicolas Meienberger 2022-10-12 00:20:51 +02:00
parent 82ad17082a
commit a2fb8895ee
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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"