troubleshoot_server: Add helper for resolvconf error
This commit is contained in:
parent
5bf5065d9a
commit
db14606dbe
|
@ -13,6 +13,18 @@ YELLOW='\033[1;33m'
|
|||
RED='\033[0;31m'
|
||||
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
|
||||
now=$(date)
|
||||
echo -e -------------- $now -------------- | tee -a checklog.log
|
||||
|
|
Loading…
Reference in New Issue