improved postgres support + added db encoding

This commit is contained in:
Serghey Rodin 2011-09-30 16:40:26 +03:00
commit bb0f156b89
3 changed files with 33 additions and 18 deletions

View file

@ -12,6 +12,7 @@ db_user="$user"_"$3"
db_password="$4"
type="$5"
host=$6
encoding="${7-UTF8}"
# Importing variables
source $VESTA/conf/vars.conf
@ -24,10 +25,10 @@ source $V_FUNC/db_func.sh
#----------------------------------------------------------#
# Checking arg number
check_args '5' "$#" 'user db db_user db_password type [host]'
check_args '5' "$#" 'user db db_user db_password type [host] [encoding]'
# Checking argument format
format_validation 'user' 'database' 'db_user' 'db_password'
format_validation 'user' 'database' 'db_user' 'db_password' 'encoding'
# Checking db system is enabled
is_system_enabled 'db'

View file

@ -68,6 +68,7 @@ esac
# Adding host to conf
echo "$new_str" >> $V_DB/$type.conf
chmod 650 $V_DB/$type.conf
#----------------------------------------------------------#