/ Published in: Bash

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash # This script finds all sites in Plesk that have the mail enabled, then disables them. SiteList=`egrep 'Server(Name)' /var/www/vhosts/*/conf/httpd.include|awk '{print $3}'|grep -v www.*|grep -v '^.*\..*\..*$'|sed 's/:80//'|sed 's/:443//'|sort -u`; for Site in $SiteList do Result=`/usr/local/psa/bin/domain -i $Site | grep 'Mail service' | awk '{print $3}'`; if [ $Result == On ]; then Command=`/usr/local/psa/bin/domain -u $Site -mail_service false` echo "Turning Off Mail Service: $Site"; fi done
Comments
