correct message location

This commit is contained in:
Alexandre
2021-10-31 11:50:00 +01:00
parent 11a92de67a
commit 475c88bc55

View File

@@ -49,8 +49,7 @@ jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/set
echo "Making sure settings.json structure is good"
for KEYS in "incomplete-dir" "download-dir" "rpc-host-whitelist-enabled" "rpc-authentication-required" "rpc-username" "rpc-password" "rpc-whitelist-enabled" "rpc-whitelist"; do
KEYSTHERE=$(jq "has(\"${KEYS}\")" $CONFIGDIR/settings.json)
[ $KEYSTHERE != true ] && sed -i "3 i\"${KEYS}\": null," $CONFIGDIR/settings.json
echo "... $KEYS was missing, added"
[ $KEYSTHERE != "true" ] && sed -i "3 i\"${KEYS}\": null," $CONFIGDIR/settings.json && echo "... $KEYS was missing, added"
done
jq . -S $CONFIGDIR/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json