mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Added database tab triggers. Issue #50
This commit is contained in:
parent
d85b468c59
commit
75f9977cbf
4 changed files with 6 additions and 26 deletions
|
@ -65,6 +65,7 @@ esac
|
|||
|
||||
# Updating db value
|
||||
update_db_base_value '$SUSPENDED' 'yes'
|
||||
increase_user_value "$user" '$SUSPENDED_DB'
|
||||
|
||||
# Logging
|
||||
log_event 'system' "$V_EVENT"
|
||||
|
|
|
@ -52,20 +52,9 @@ search_string="SUSPENDED='no'"
|
|||
# Parsing unsuspeneded domains
|
||||
databases=$(db_clear_search)
|
||||
|
||||
# Starting suspend loop
|
||||
for database in $databases; do
|
||||
# Define database variables
|
||||
db_user=$(get_db_value '$USER')
|
||||
host=$(get_db_value '$HOST')
|
||||
type=$(get_db_value '$TYPE')
|
||||
|
||||
# Switching on db type
|
||||
case $type in
|
||||
mysql) suspend_db_mysql ;;
|
||||
pgsql) suspend_db_pgsql ;;
|
||||
esac
|
||||
|
||||
# Updating db value
|
||||
update_db_base_value '$SUSPENDED' 'yes'
|
||||
$V_BIN/v_suspend_db_base "$user" "$database"
|
||||
done
|
||||
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ esac
|
|||
|
||||
# Updating db value
|
||||
update_db_base_value '$SUSPENDED' 'no'
|
||||
decrease_user_value "$user" '$SUSPENDED_DB'
|
||||
|
||||
# Logging
|
||||
log_event 'system' "$V_EVENT"
|
||||
|
|
|
@ -52,20 +52,9 @@ search_string="SUSPENDED='yes'"
|
|||
# Parsing unsuspeneded domains
|
||||
databases=$(db_clear_search)
|
||||
|
||||
# Starting suspend loop
|
||||
for database in $databases; do
|
||||
# Define database variables
|
||||
db_user=$(get_db_value '$USER')
|
||||
host=$(get_db_value '$HOST')
|
||||
type=$(get_db_value '$TYPE')
|
||||
|
||||
# Switching on db type
|
||||
case $type in
|
||||
mysql) unsuspend_db_mysql ;;
|
||||
pgsql) unsuspend_db_pgsql ;;
|
||||
esac
|
||||
|
||||
# Updating db value
|
||||
update_db_base_value '$SUSPENDED' 'no'
|
||||
$V_BIN/v_unsuspend_db_base "$user" "$database"
|
||||
done
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue