Here I wrote little bash script for that purpose... can share if anyone needs:
Quote:#!/bin/bash
DOM_DIR=/var/www/virtual # directory where all domains go
DOMAINS="`ls $DOM_DIR`" # domains we have
MOVED="`ls $DOM_DIR/suspend | grep -v 'htdocs'`" # directory where we would link for message
# this dir also should contain 'htdocs' subdir
for dom in $DOMAINS
do
if [ ${dom##*.} == "disabled" ] # if we have disabled domain...
then
DEST_DIR=${DOM_DIR}/${dom%.*} # destination dir = removed .disabled
[ ! -e ${DEST_DIR} ] && ln -s suspend ${DEST_DIR}
fi
done
###################################################################
for mov in $MOVED
# if dommain has been enabled
do
DOMAIN=${mov%.*} # remove .dsiabled string from it
[ -e ${DOM_DIR}/${DOMAIN} ] && unlink ${DOM_DIR}/${DOMAIN} # unlink domain if exists
mv ${DOM_DIR}/suspend/${mov} ${DOM_DIR}/${DOMAIN} # move folder *.disabled to its original position
done
change script to meet your needs, save it, name it whatever you like and after
place it in your cronjob (crontab -e then type five asterisks followed by the path of this script)
Here is the good link for crontab howto:
http://blog.fekw.de/2008/04/05/cronjob-crontab-howto/
Happy new year all...