I tried to use this script on my Debian 11 server, but got some issues, the first one, it doesn't detect my OS so i fix the os detection and how to check the os codes,
then i run it as root, and got sudo not found for my situation, so i add a Function to run commands, and make it as an optional choice to use sudo command or not using it if the current user it root
don't know it's a good change or not but i think maybe it worth to send a pull request to share my changes to your code base.
I tried to use this script on my Debian 11 server, but got some issues, the first one, it doesn't detect my OS so i fix the os detection and how to check the os codes, then i run it as root, and got sudo not found for my situation, so i add a Function to run commands, and make it as an optional choice to use sudo command or not using it if the current user it root
don't know it's a good change or not but i think maybe it worth to send a pull request to share my changes to your code base.
Kind regards