I am a beginner in the shell language. I hope to merge these if sentences. How to optimize them?

if [ ! -f "./service/config/setting.js" ];then
    echo ""
else
    rm -f ./service/config/setting.js
fi

if [ $USE_LOGIN ]; then
    USE_LOGIN=$USE_LOGIN
else
    USE_LOGIN="http://898101.0.0.1/api/login"
fi

if [ $searchOrdinary ]; then
    searchOrdinary=$searchOrdinary
else
    searchOrdinary="http://127.0.0.1/api/search/common"
fi

if [ $searchLabel ]; then
    searchLabel=$searchLabel
else
    searchLabel="http://127.0.0.1/api/search/common"
fi

if [ $searchVideo ]; then
    searchVideo = $searchVideo
else
    searchVideo="http://127.0.0.1/api/search/common"
fi

if [ $taskManager ]; then
    taskManager=$taskManager
else
    taskManager="http://127.0.0.1/api/search/common"
fi
echo "
    pythonAPI: {

            //userLogin : "http://10.23.102.148:5002/api/login", //  api
            userLogin : "$USE_LOGIN",
            video: "", //
            searchOrdinary: "$searchOrdinary", // 
            //searchLabel: "/api/search/result", // 
            searchLabel: "$searchLabel",
            searchVideo : "$searchVideo", // 
            taskManager: "$taskManager" // 
        };" >> ./service/config/setting.js
Apr.01,2021

-sharp!/bin/bash -e

USE_LOGIN=${USE_LOGIN:-http://127.0.0.1/api/search/common}
searchOrdinary=${searchOrdinary:-http://127.0.0.1/api/search/common}
searchVideo=${searchVideo:-http://127.0.0.1/api/search/common}
taskManager=${taskManager:-http://127.0.0.1/api/search/common}

cat > ./service/config/setting.js <<EOF
pythonAPI: {
    //userLogin : 'http://10.23.102.148:5002/api/login', //  api
    userLogin : '$USE_LOGIN',
    video: '', //
    searchOrdinary: '$searchOrdinary', // 
    //searchLabel: '/api/search/result', // 
    searchLabel: '$searchLabel',
    searchVideo : '$searchVideo', // 
    taskManager: '$taskManager' // 
};
EOF
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49023-43c76.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49023-43c76.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?