fix for caching template

This commit is contained in:
Serghey Rodin 2015-10-05 23:31:53 +03:00
commit b6dd534b60
3 changed files with 9 additions and 9 deletions

View file

@ -188,8 +188,8 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
if [ -z "$(grep "$conf" $proxy_conf)" ]; then if [ -z "$(grep "$conf" $proxy_conf)" ]; then
echo "include $conf;" >> $proxy_conf echo "include $conf;" >> $proxy_conf
fi fi
if [ -x $WEBTPL/$PROXY_SYSTEM/$template.sh ]; then if [ -x $WEBTPL/$PROXY_SYSTEM/$proxy.sh ]; then
$WEBTPL/$PROXY_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot $WEBTPL/$PROXY_SYSTEM/$proxy.sh $user $domain $ip $HOMEDIR $docroot
fi fi
fi fi

View file

@ -227,7 +227,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
# Backup files # Backup files
cd $HOMEDIR/$user/web/$domain cd $HOMEDIR/$user/web/$domain
find . ${fargs[@]} -type f -print0 |\ find . ${fargs[@]} -type f -or -type l -print0 |\
tar -cpf $tmpdir/web/$domain/domain_data.tar --null -T - tar -cpf $tmpdir/web/$domain/domain_data.tar --null -T -
# Backup empty folders # Backup empty folders
@ -490,7 +490,7 @@ if [ "$USER" != '*' ]; then
IFS=$'\n' IFS=$'\n'
set -f set -f
i=0 i=0
for udir in $(ls |egrep -v "conf|web|dns|mail"); do for udir in $(ls -a |egrep -v "conf|web|dns|mail|^\.\.$|^\.$"); do
check_exl=$(echo -e "${USER//,/\n}" |grep "^$udir$") check_exl=$(echo -e "${USER//,/\n}" |grep "^$udir$")
if [ -z "$check_exl" ]; then if [ -z "$check_exl" ]; then
((i ++)) ((i ++))
@ -499,7 +499,7 @@ if [ "$USER" != '*' ]; then
msg="$msg\n$(date "+%F %T") adding directory $udir" msg="$msg\n$(date "+%F %T") adding directory $udir"
# Backup files # Backup files
find ./$udir ${fargs[@]} -type f -print0 |\ find ./$udir ${fargs[@]} -type f -or -type l -print0 |\
tar -cpf $tmpdir/user_dir/$udir.tar --null -T - tar -cpf $tmpdir/user_dir/$udir.tar --null -T -
# Backup empty folders # Backup empty folders

View file

@ -11,11 +11,11 @@ is_web_template_valid() {
# Proxy template check # Proxy template check
is_proxy_template_valid() { is_proxy_template_valid() {
template=$1 proxy=$1
t="$WEBTPL/$PROXY_SYSTEM/$template.tpl" t="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl"
s="$WEBTPL/$PROXY_SYSTEM/$template.stpl" s="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl"
if [ ! -e $t ] || [ ! -e $s ]; then if [ ! -e $t ] || [ ! -e $s ]; then
echo "Error: proxy template $template not found" echo "Error: proxy template $proxy not found"
log_event "$E_NOTEXIST" "$EVENT" log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST exit $E_NOTEXIST
fi fi