mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Restore traffic pipe
This commit is contained in:
parent
fbb49197be
commit
a5ff23de74
1 changed files with 12 additions and 4 deletions
|
@ -89,7 +89,7 @@ fi
|
||||||
disk_usage=$(df $BACKUP |tail -n1 |tr ' ' '\n' |grep % |cut -f 1 -d %)
|
disk_usage=$(df $BACKUP |tail -n1 |tr ' ' '\n' |grep % |cut -f 1 -d %)
|
||||||
if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then
|
if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then
|
||||||
rm -rf $tmpdir
|
rm -rf $tmpdir
|
||||||
echo "Not enough disk space to run backup" | $send_mail -s "$subj" $email
|
echo "Not enough disk space to run restore" | $send_mail -s "$subj" $email
|
||||||
echo "Error: Not enough disk space"
|
echo "Error: Not enough disk space"
|
||||||
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
||||||
log_event "$E_DISK" "$EVENT"
|
log_event "$E_DISK" "$EVENT"
|
||||||
|
@ -399,16 +399,24 @@ if [ "$web" != 'no' ]; then
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Add user to traff queue
|
||||||
|
sed -i "/ $user /d" $VESTA/data/queue/traffic.pipe
|
||||||
|
echo "$BIN/v-update-web-domains-traff $user" >>\
|
||||||
|
$VESTA/data/queue/traffic.pipe
|
||||||
|
|
||||||
# Restart WEB
|
# Restart WEB
|
||||||
$BIN/v-restart-web
|
$BIN/v-restart-web
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Restart Proxy
|
||||||
|
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||||
$BIN/v-restart-proxy
|
$BIN/v-restart-proxy
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
msg="$msg\n"
|
msg="$msg\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue