#!/bin/bash #DC-Installer.sh #Bootstrap to GIT REPO TEXTRESET=$(tput sgr0) RED=$(tput setaf 1) YELLOW=$(tput setaf 3) GREEN=$(tput setaf 2) USER=$(whoami) MAJOROS=$(cat /etc/redhat-release | grep -Eo "[0-9]" | sed '$d') #Checking for user permissions if [ "$USER" = "root" ]; then echo " " else echo ${RED}"This program must be run as root ${TEXTRESET}" echo "Exiting" fi #Checking for version Information if [ "$MAJOROS" = "9" ]; then echo " " else echo ${RED}"Sorry, but this installer only works on Rocky 9.X ${TEXTRESET}" echo "Please upgrade to ${GREEN}Rocky 9.x${TEXTRESET}" echo "Exiting the installer..." exit fi cat <&1 >/dev/tty); do case $choice in 1) clear && cd /root && chmod 700 /root/RADSPatch/patches/samba-dnf-update-patch.sh && /root/RADSPatch/patches/samba-dnf-update-patch.sh;; 2) exit ;; esac done clear # clear after user pressed Cancel