19 lines
598 B
Bash
Executable file
19 lines
598 B
Bash
Executable file
print_config_title 'CHECK HOSTNAME'
|
|
|
|
# Check if hostname includes .grifon.fr or .grif
|
|
echo "Check if hostname includes .grifon.fr or .grif"
|
|
grep -q -i -e "hostname=\".*\.grifon\.fr\"" -e "hostname=\".*\.grif\"" /etc/conf.d/hostname
|
|
|
|
# Return Code
|
|
RC=$?
|
|
|
|
# grifon.fr not included in hostname
|
|
if [ $RC -ne 0 ]
|
|
then
|
|
BOOL_CHECK_HOSTNAME=1
|
|
echo -e "${RED}Hostname *.grif or *.grifon.fr NOT CONFIGURED in /etc/conf.d/hostname : check KO${NC}\n"
|
|
# Service started without error
|
|
else
|
|
echo -e "${GREEN}Hostname *.grif or *.grifon.fr CONFIGURED in /etc/conf.d/hostname : check OK${NC}\n"
|
|
fi
|