File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 22# info: restore user
33# options: USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]
44#
5- # The function for resotring user from backup.
5+ # The function for restoring user from backup.
66
77
88# ----------------------------------------------------------#
@@ -399,6 +399,8 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
399399 fi
400400
401401 # Restoring web domain data
402+ if [ -d " $HOMEDIR /$user /web/$domain /public_html" ]
403+ rm -rf $HOMEDIR /$user /web/$domain /public_html/*
402404 tar -xzpf $tmpdir /web/$domain /domain_data.tar.gz \
403405 -C $HOMEDIR /$user /web/$domain /
404406 if [ " $? " -ne 0 ]; then
@@ -409,10 +411,6 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
409411 check_result " $E_PARSING " " $error "
410412 fi
411413
412- # Applying fix for tar < 1.24
413- find $HOMEDIR /$user /web/$domain -type d \
414- -exec chown -h $user :$user {} \;
415-
416414 # Re-chowning files if uid differs
417415 if [ " $old_uid " -ne " $new_uid " ]; then
418416 find $HOMEDIR /$user /web/$domain / -user $old_uid \
You can’t perform that action at this time.
0 commit comments