Skip to content

Commit a15eb49

Browse files
committed
Fix check if it was a vesta or hestia backup
1 parent f9e44f0 commit a15eb49

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

bin/v-restore-user

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,15 @@ if [ "$create_user" = 'yes' ]; then
249249
# Unpacking user container
250250
tar xf $BACKUP/$backup -C $tmpdir ./hestia
251251
if [ "$?" -ne 0 ]; then
252-
rm -rf $tmpdir
253-
echo "Can't unpack user contaner" |$SENDMAIL -s "$subj" $email $notify
254-
sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe
255-
check_result "$E_PARSING" "can't unpack user contaner"
256-
fi
257-
258-
# Check if it is a vesta or hestia backup
259-
if [ -d "$tmpdir/vesta" ]; then
260-
backup_system="vesta"
252+
tar xf $BACKUP/$backup -C $tmpdir ./vesta
253+
if [ "$?" -ne 0 ]; then
254+
rm -rf $tmpdir
255+
echo "Can't unpack user contaner" |$SENDMAIL -s "$subj" $email $notify
256+
sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe
257+
check_result "$E_PARSING" "can't unpack user contaner"
258+
else
259+
backup_system="vesta"
260+
fi
261261
else
262262
backup_system="hestia"
263263
fi

0 commit comments

Comments
 (0)