diff --git a/lego_wrapper.sh b/lego_wrapper.sh index 1a14be5..170088f 100644 --- a/lego_wrapper.sh +++ b/lego_wrapper.sh @@ -220,14 +220,14 @@ get_system_information() { get_os_type() { #get OSTYPE - modify to know defualt package name to use for installation - os_type=$(awk -F'=' '/ID_LIKE/ {print $2}' /etc/os-release | awk -F'"' '{print $2}') + os_type=$(awk -F'=' '/^ID/ {print $2}' /etc/os-release') if [[ $os_type == *"debian"* ]]; then install_cmd="apt" elif [[ $os_type == *"ubuntu"* ]]; then install_cmd="apt" elif [[ $os_type == *"almalinux"* ]]; then install_cmd="yum" - elif [[ $os_type == *"redhat"* ]]; then + elif [[ $os_type == *"rhel"* ]]; then install_cmd="yum" elif [[ $os_type == *"centos"* ]]; then install_cmd="yum"