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 if [[ -f $USER_CONFIG_PATH ]]; then
TARGET=$(cat $USER_CONFIG_PATH | head -n-2); TARGET=$(cat $USER_CONFIG_PATH | head -n-2);
{ {
if [ "$TARGET" != "" ]; then
echo $TARGET echo $TARGET
echo "}," echo "},"
else
echo "{";
fi;
echo $LETS_CONTENT echo $LETS_CONTENT
echo "}" echo "}"
} >> "$TMP_FILE"; } >> "$TMP_FILE";