Updating Kodi database via bash. Working great, but curious if there's a better way.



On my Ubuntu server, I have a bash alias —> calls update.sh —> to trigger my kodi-headless docker container —> to update Kodi database in a MariaDB docker container.

My bash alias is 

Code:
alias kodi-update="sh path/to/update.sh"

My update script is

Code:
sudo docker exec kodi-headless curl --http0.9 -H "Content-Type: application/json" -u USERNAMETongueASSWORD -d '{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":"scan"}' http://IPADDRESS:PORT/jsonrpc > /dev/null 2>&1
echo "\n>>>> Updating and cleaning Kodi media database...\n"

I know it’s currently coded to ignore output and only show my own echo statement after the command. The docker containers are configured based on the dozens of threads I’ve seen on this forum, so I won’t get into that. My focus on using bash to query an update without having to use the headless GUI every time I want to update.

Like I said, it works great and does exactly what I want to do. I’m just curious if there’s a better way of doing this? Thanks.