#!/bin/bash DOMAIN_LIST="/root/suspend_domains.txt" if [ ! -f "$DOMAIN_LIST" ]; then echo "File $DOMAIN_LIST not exist" exit 1 fi while IFS= read -r domain; do username=$(grep "$domain" /etc/userdomains | awk '{print $2}') if [ -n "$username" ]; then echo "suspend: $username (domain: $domain)" /scripts/suspendacct "$username" else echo "Not found user cho domain: $domain" fi done < "$DOMAIN_LIST" echo "Suspend success"