improved detecting fails and errors.

This commit is contained in:
Pierre Gode 2019-04-02 13:27:53 +02:00
parent 50c80a2fe6
commit 44c81e2b07
2 changed files with 10 additions and 0 deletions

View File

@ -1144,6 +1144,7 @@ exit
failcheck(){
clear
export HOSTNAME
myhost=$( hostname | cut -d '.' -f1 )
if ! hostname | cut -d '.' -f1
then
echo "Sorry I am having issues finding your domain.. please type it"
@ -1208,6 +1209,7 @@ exit
failcheck_yum(){
clear
export HOSTNAME
myhost=$( hostname | cut -d '.' -f1 )
if ! hostname | cut -d '.' -f1
then
echo "Sorry I am having issues finding your domain.. please type it"

8
tempCodeRunnerFile.sh Normal file
View File

@ -0,0 +1,8 @@
echo Checking sudoers file.. "${INTRO_TEXT}OK${END}"
grouPs=$(grep -i "$myhost" /etc/sudoers.d/sudoers | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
if [ $grouPs = "$myhost""sudoers" ]
then
echo Checking sudoers users.. "${INTRO_TEXT}OK${END}"
else
echo Checking sudoers users.. "${RED_TEXT}FAIL${END}"
fi