From ddb655156546e7927c19303c172ac6c1e12df2c5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Aug 2024 06:03:44 -0400 Subject: [PATCH] Update lldap-install.sh Refactor --- install/lldap-install.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/install/lldap-install.sh b/install/lldap-install.sh index 71bf7f9b..0bdebe94 100644 --- a/install/lldap-install.sh +++ b/install/lldap-install.sh @@ -22,17 +22,15 @@ $STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing lldap" -DISTRO="Debian" -os=$(less /etc/os-release | grep "^ID=") -os="${os:3}" +source /etc/os-release +os=$ID if [ "$os" == "ubuntu" ]; then - DISTRO="Ubuntu" + DISTRO="xUbuntu" +else + DISTRO="${os^}" fi -DISTRO_VER=$(less /etc/os-release | grep "^VERSION_ID=") -DISTRO_VER="${DISTRO_VER:12}" -DISTRO_VER="${DISTRO_VER%%\"}" -echo "deb http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${DISTRO_VER}/ /" > /etc/apt/sources.list.d/home:Masgalor:LLDAP.list -curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${DISTRO_VER}/Release.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/home_Masgalor_LLDAP.gpg +echo "deb http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_${VERSION_ID}/ /" >/etc/apt/sources.list.d/home:Masgalor:LLDAP.list +curl -fsSL https://download.opensuse.org/repositories/home:Masgalor:LLDAP/${DISTRO}_${VERSION_ID}/Release.key | gpg --dearmor >/etc/apt/trusted.gpg.d/home_Masgalor_LLDAP.gpg $STD apt update $STD apt install -y lldap systemctl enable -q --now lldap