mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Merge branch 'pr/28'
This commit is contained in:
commit
c1eb00dabb
26 changed files with 48 additions and 11 deletions
|
@ -113,9 +113,12 @@ if [ "$aliases" = 'none' ]; then
|
|||
ALIAS=''
|
||||
else
|
||||
ALIAS="www.$domain"
|
||||
if [ ! -z "$aliases" ]; then
|
||||
ALIAS="$ALIAS,$aliases"
|
||||
if [ -z "$aliases" ]; then
|
||||
ALIAS="www.$domain"
|
||||
else
|
||||
ALIAS="$aliases"
|
||||
fi
|
||||
|
||||
ip_alias=$(get_ip_alias $domain)
|
||||
if [ ! -z "$ip_alias" ]; then
|
||||
ALIAS="$ALIAS,$ip_alias"
|
||||
|
|
|
@ -203,6 +203,9 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
|
|||
cp $USER_DATA/ssl/$domain.* vesta/
|
||||
fi
|
||||
|
||||
# Changin dir to documentroot
|
||||
cd $HOMEDIR/$user/web/$domain
|
||||
|
||||
# Define exclude arguments
|
||||
exlusion=$(echo -e "$WEB" |tr ',' '\n' |grep "^$domain:")
|
||||
set -f
|
||||
|
@ -211,15 +214,21 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
|
|||
if [ ! -z "$exlusion" ]; then
|
||||
xdirs="$(echo -e "$exlusion" |tr ':' '\n' |grep -v $domain)"
|
||||
for xpath in $xdirs; do
|
||||
fargs+=(--exclude=$xpath/*)
|
||||
echo "$(date "+%F %T") excluding directory $xpath"
|
||||
msg="$msg\n$(date "+%F %T") excluding directory $xpath"
|
||||
for xpath in $xdirs; do
|
||||
if [ -d "$xpath" ]; then
|
||||
fargs+=(--exclude=$xpath/*)
|
||||
echo "$(date "+%F %T") excluding directory $xpath"
|
||||
msg="$msg\n$(date "+%F %T") excluding directory $xpath"
|
||||
else
|
||||
echo "$(date "+%F %T") excluding file $xpath"
|
||||
msg="$msg\n$(date "+%F %T") excluding file $xpath"
|
||||
fargs+=(--exclude=$xpath)
|
||||
fi
|
||||
done
|
||||
fi
|
||||
set +f
|
||||
|
||||
# Backup files
|
||||
cd $HOMEDIR/$user/web/$domain
|
||||
tar -cpf- * ${fargs[@]} |gzip -$BACKUP_GZIP - > $tmpdir/web/$domain/domain_data.tar.gz
|
||||
done
|
||||
|
||||
|
|
|
@ -31,7 +31,11 @@ for user in $users; do
|
|||
# Checking user certificates
|
||||
lecounter=0
|
||||
for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do
|
||||
|
||||
# Working on Web domain check - if is suspended
|
||||
webSuspended=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='no")
|
||||
if [ ! -z "$webSuspended" ]; then
|
||||
continue;
|
||||
fi;
|
||||
crt="$VESTA/data/users/$user/ssl/$domain.crt"
|
||||
crt_data=$(openssl x509 -text -in "$crt")
|
||||
expire=$(echo "$crt_data" |grep "Not After")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue