Files
vtl-appliance/scripts/unload-mhvtl.sh

40 lines
670 B
Bash
Executable File

#!/bin/bash
set -e
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_info() {
echo -e "${YELLOW}${NC} $1"
}
print_success() {
echo -e "${GREEN}${NC} $1"
}
print_error() {
echo -e "${RED}${NC} $1"
}
if [ "$EUID" -ne 0 ]; then
print_error "Please run as root or with sudo"
exit 1
fi
print_info "Stopping mhvtl services..."
systemctl stop mhvtl 2>/dev/null || true
print_info "Unloading mhvtl kernel modules..."
if lsmod | grep -q mhvtl; then
rmmod mhvtl 2>/dev/null || true
print_success "mhvtl kernel module unloaded"
else
print_info "mhvtl modules not loaded"
fi
print_success "mhvtl unloaded"