Added database tab triggers. Issue #50

This commit is contained in:
Serghey Rodin 2012-02-20 16:51:28 +02:00
commit 75f9977cbf
4 changed files with 6 additions and 26 deletions

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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