Added CHARSET key into database db.

This commit is contained in:
Serghey Rodin 2012-01-16 17:55:00 +02:00
commit 7717f0be5c
3 changed files with 6 additions and 5 deletions

View file

@ -23,7 +23,7 @@ db_password=$4
type=$5
host=$6
encoding=${7-UTF8}
encoding=$(echo "$encoding" |tr '[:lower:]' '[:upper:]')
# Importing variables
source $VESTA/conf/vars.conf
source $V_CONF/vesta.conf
@ -89,7 +89,7 @@ increase_user_value "$user" '$U_DATABASES'
# Adding db to db conf
v_str="DB='$database' USER='$db_user' HOST='$host' TYPE='$type'"
v_str="$v_str U_DISK='0' SUSPEND='no' DATE='$V_DATE'"
v_str="$v_str LOCALE='$encoding' U_DISK='0' SUSPEND='no' DATE='$V_DATE'"
echo "$v_str">>$V_USERS/$user/db.conf
# Hiding password

View file

@ -107,7 +107,7 @@ is_db_valid
conf=$V_USERS/$user/db.conf
# Defining fileds to select
fields='$DB $USER $HOST $TYPE $U_DISK $SUSPEND $DATE'
fields='$DB $USER $HOST $TYPE $CHARSET $U_DISK $SUSPEND $DATE'
# Listing database
case $format in

View file

@ -40,13 +40,14 @@ is_user_valid
conf=$V_USERS/$user/db.conf
# Defining fileds to select
fields='$DB $USER $HOST $TYPE $U_DISK $SUSPEND $DATE'
fields='$DB $USER $HOST $TYPE $CHARSET $U_DISK $SUSPEND $DATE'
# Listing databases
case $format in
json) json_list ;;
plain) nohead=1; shell_list ;;
shell) shell_list | column -t ;;
shell) fields='$DB $USER $HOST $TYPE $U_DISK $DATE';
shell_list | column -t ;;
*) check_args '1' '0' 'user [format]'
esac