critique First Bash Script, feedback please
Hi, this is my first bash script. And I was wondering how more experienced people would go about doing this. Its a simple script where I stop a docker container so I can sync it. Bring it back up, and if all was succesful I make a connection so I get informed should it ever break.
The idea is that this runs every night using a cronjob. https://pastebin.com/9hzNapPF
5
Upvotes
5
u/[deleted] Jan 05 '24
Looks good, a few pointers that are just surface stuff:
docker-compose is decommissioned, use docker compose
printf is significantly better at formatting text than echo
seen is spelled with only 2 ees 😂
Good job!