Distribution dependent package installation script
I’ve been searching the webs for a solution to my issue and have not come across something solid that works for me. Any help is appreciated.
I would like to install a package (In this case openconnect) using a script that will install it on any linux distribution depending on the OS type.
I know in Debian derivatives I can issue
apt-get install openconnect
I know in RHEL derivatives I can issue
yum install openconnect
In Fedora I can issue
dnf install openconnect
However, I’d like my script to identify the distribution it is running on and use the appropriate package management tool to install it. I do not want my script to work on every distribution, just Debian, Kali, Ubuntu, Fedora, and CentOS.