Mini Shell

Direktori : /usr/share/l.v.e-manager/utils/
Upload File :
Current File : //usr/share/l.v.e-manager/utils/plesk-cgi.sh

#!/usr/bin/bash

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

mkdir -p /usr/share/lve/plesk/script/domini-cgi
cd /usr/share/lve/plesk/script/domini-cgi
domini=`ls -1 /var/www/vhosts`
for domini in $domini
do
touch $domini > /usr/share/lve/plesk/script/domini-cgi/$domini
done
#
rm -rf /usr/share/lve/plesk/script/domini-cgi/default
rm -rf /usr/share/lve/plesk/script/domini-cgi/chroot

##############################################

ls -1 /usr/share/lve/plesk/script/domini-cgi/ > /usr/share/lve/plesk/script/domini_cgi.txt

##############################################

sottodomini=`cat /usr/share/lve/plesk/script/domini_cgi.txt`
for sottodomini_cgi in $sottodomini
do
ls -1 /var/www/vhosts/$sottodomini_cgi/subdomains >> /usr/share/lve/plesk/script/domini-cgi/$sottodomini_cgi
done

###############################################

check=`ls -1 /usr/share/lve/plesk/script/domini-cgi`
for cgi in $check
do
checking=`cat $cgi`
for cgic in $checking
do
/usr/local/psa/bin/subdomain --update $cgic -domain $cgi -cgi true
done
/usr/local/psa/bin/domain --update $cgi -cgi true
done

################################################

rm -rf /usr/share/lve/plesk/script/domini-cgi/
rm -rf /usr/share/lve/plesk/script/domini_cgi.txt

################################################

exit

Zerion Mini Shell 1.0