troubleshoot_server: Add helper for resolvconf error

This commit is contained in:
silversword411 2024-06-24 16:24:14 -04:00
parent 5bf5065d9a
commit db14606dbe
1 changed files with 12 additions and 0 deletions

View File

@ -13,6 +13,18 @@ YELLOW='\033[1;33m'
RED='\033[0;31m' RED='\033[0;31m'
NC='\033[0m' NC='\033[0m'
# Function to check if a resolvconf is installed
command_exists() {
command -v "$1" &> /dev/null
}
# Check if resolvconf command is available
if ! command_exists resolvconf; then
echo -e "${RED}Error: resolvconf command not found.${NC}"
echo -e "${YELLOW}Please install it using: ${NC}sudo apt install resolvconf"
exit 1
fi
# Set date at the top of the troubleshooting script # Set date at the top of the troubleshooting script
now=$(date) now=$(date)
echo -e -------------- $now -------------- | tee -a checklog.log echo -e -------------- $now -------------- | tee -a checklog.log