Skip to content

Commit c2f96db

Browse files
committed
Update v-backup-user
1 parent a331088 commit c2f96db

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

bin/v-backup-user

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,27 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
209209
fi
210210
fi
211211

212+
domain_conf=$(grep "DOMAIN='$domain'" $conf)
213+
parse_object_kv_list_non_eval domain_conf
214+
215+
mkdir template/
216+
mkdir template/$WEB_SYSTEM/
217+
mkdir template/php-fpm/
218+
219+
if [ $WEB_BACKEND == 'php-fpm' ]; then
220+
cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.tpl template/$WEB_SYSTEM/
221+
cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.stpl template/$WEB_SYSTEM/
222+
cp $HESTIA/data/templates/web/php-fpm/$BACKEND.tpl template/php-fpm/
223+
else
224+
cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.tpl template/$WEB_SYSTEM/
225+
cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.stpl template/$WEB_SYSTEM/
226+
fi
227+
if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
228+
mkdir template/$PROXY_SYSTEM
229+
cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.tpl template/$PROXY_SYSTEM/
230+
cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.stpl template/$PROXY_SYSTEM/
231+
fi
232+
212233
# Backup custom config / backup LE config
213234
for sconfig in $(ls $HOMEDIR/$user/conf/web/|grep ".$domain.conf"); do
214235
cp $HOMEDIR/$user/conf/web/$sconfig conf/
@@ -545,6 +566,7 @@ if [ "$USER" != '*' ]; then
545566
tee -a $BACKUP/$user.log
546567
fi
547568
fi
569+
548570
if [ "$BACKUP_MODE" = 'zstd' ]; then
549571
touch $tmpdir/.zstd
550572
fi

0 commit comments

Comments
 (0)