if user.json exists but empty then add content not append
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-11-14 13:38:41 +01:00
parent 781d60850c
commit d99e7782a3

View File

@@ -260,8 +260,12 @@ for i in $(echo $PROXY_TYPE); do
if [[ -f $USER_CONFIG_PATH ]]; then
TARGET=$(cat $USER_CONFIG_PATH | head -n-2);
{
echo $TARGET
echo "},"
if [ "$TARGET" != "" ]; then
echo $TARGET
echo "},"
else
echo "{";
fi;
echo $LETS_CONTENT
echo "}"
} >> "$TMP_FILE";