improving the devenv setup process, take 2
This commit is contained in:
parent
8734e53340
commit
12be6361e2
2 changed files with 28 additions and 4 deletions
|
@ -103,6 +103,17 @@ echo "for user: $user.";
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# The details of installation
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
postgres_user=postgres
|
||||||
|
|
||||||
|
ls_database=LiveSupport-$user
|
||||||
|
ls_dbuser=test
|
||||||
|
ls_dbpassword=test
|
||||||
|
ls_dbserver=localhost
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Function to check for the existence of an executable on the PATH
|
# Function to check for the existence of an executable on the PATH
|
||||||
#
|
#
|
||||||
|
@ -143,8 +154,6 @@ check_exe "odbcinst" || exit 1;
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
echo "Creating database and database user...";
|
echo "Creating database and database user...";
|
||||||
|
|
||||||
postgres_user=postgres
|
|
||||||
|
|
||||||
# FIXME: the below might not work for remote databases
|
# FIXME: the below might not work for remote databases
|
||||||
|
|
||||||
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
|
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
|
||||||
|
@ -171,6 +180,9 @@ odbcinst_template=$products_dir/scheduler/etc/odbcinst_template
|
||||||
odbc_template=$products_dir/scheduler/etc/odbc_template
|
odbc_template=$products_dir/scheduler/etc/odbc_template
|
||||||
odbc_template_tmp=/tmp/odbc_template.$$
|
odbc_template_tmp=/tmp/odbc_template.$$
|
||||||
|
|
||||||
|
replace_sed_string="s/ls_database/$ls_database/; \
|
||||||
|
s/ls_dbserver/$ls_dbserver/;"
|
||||||
|
|
||||||
# check for an existing PostgreSQL ODBC driver, and only install if necessary
|
# check for an existing PostgreSQL ODBC driver, and only install if necessary
|
||||||
odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"`
|
odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"`
|
||||||
if [ "x$odbcinst_res" == "x" ]; then
|
if [ "x$odbcinst_res" == "x" ]; then
|
||||||
|
|
|
@ -103,6 +103,17 @@ echo "for user: $user.";
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# The details of installation
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
postgres_user=postgres
|
||||||
|
|
||||||
|
ls_database=LiveSupport-$user
|
||||||
|
ls_dbuser=test
|
||||||
|
ls_dbpassword=test
|
||||||
|
ls_dbserver=localhost
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Function to check for the existence of an executable on the PATH
|
# Function to check for the existence of an executable on the PATH
|
||||||
#
|
#
|
||||||
|
@ -143,8 +154,6 @@ check_exe "odbcinst" || exit 1;
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
echo "Creating database and database user...";
|
echo "Creating database and database user...";
|
||||||
|
|
||||||
postgres_user=postgres
|
|
||||||
|
|
||||||
# FIXME: the below might not work for remote databases
|
# FIXME: the below might not work for remote databases
|
||||||
|
|
||||||
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
|
su - $postgres_user -c "echo \"CREATE USER $ls_dbuser \
|
||||||
|
@ -171,6 +180,9 @@ odbcinst_template=$products_dir/scheduler/etc/odbcinst_debian_template
|
||||||
odbc_template=$products_dir/scheduler/etc/odbc_template
|
odbc_template=$products_dir/scheduler/etc/odbc_template
|
||||||
odbc_template_tmp=/tmp/odbc_template.$$
|
odbc_template_tmp=/tmp/odbc_template.$$
|
||||||
|
|
||||||
|
replace_sed_string="s/ls_database/$ls_database/; \
|
||||||
|
s/ls_dbserver/$ls_dbserver/;"
|
||||||
|
|
||||||
# check for an existing PostgreSQL ODBC driver, and only install if necessary
|
# check for an existing PostgreSQL ODBC driver, and only install if necessary
|
||||||
odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"`
|
odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"`
|
||||||
if [ "x$odbcinst_res" == "x" ]; then
|
if [ "x$odbcinst_res" == "x" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue