mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
improved postgres support + added db encoding
This commit is contained in:
parent
941342035c
commit
bb0f156b89
3 changed files with 33 additions and 18 deletions
|
@ -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'
|
||||
|
|
|
@ -68,6 +68,7 @@ esac
|
|||
|
||||
# Adding host to conf
|
||||
echo "$new_str" >> $V_DB/$type.conf
|
||||
chmod 650 $V_DB/$type.conf
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue