Skip to content

Commit a5ff23d

Browse files
committed
Restore traffic pipe
1 parent fbb4919 commit a5ff23d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

bin/v-restore-user

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fi
8989
disk_usage=$(df $BACKUP |tail -n1 |tr ' ' '\n' |grep % |cut -f 1 -d %)
9090
if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then
9191
rm -rf $tmpdir
92-
echo "Not enough disk space to run backup" | $send_mail -s "$subj" $email
92+
echo "Not enough disk space to run restore" | $send_mail -s "$subj" $email
9393
echo "Error: Not enough disk space"
9494
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
9595
log_event "$E_DISK" "$EVENT"
@@ -399,15 +399,23 @@ if [ "$web" != 'no' ]; then
399399

400400
done
401401

402+
# Add user to traff queue
403+
sed -i "/ $user /d" $VESTA/data/queue/traffic.pipe
404+
echo "$BIN/v-update-web-domains-traff $user" >>\
405+
$VESTA/data/queue/traffic.pipe
406+
402407
# Restart WEB
403408
$BIN/v-restart-web
404409
if [ $? -ne 0 ]; then
405410
exit $E_RESTART
406411
fi
407412

408-
$BIN/v-restart-proxy
409-
if [ $? -ne 0 ]; then
410-
exit $E_RESTART
413+
# Restart Proxy
414+
if [ ! -z "$PROXY_SYSTEM" ]; then
415+
$BIN/v-restart-proxy
416+
if [ $? -ne 0 ]; then
417+
exit $E_RESTART
418+
fi
411419
fi
412420

413421
echo

0 commit comments

Comments
 (0)