Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
4304966a
Commit
4304966a
authored
9 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
resolved password issues with old scripts
parent
21fa7aed
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sbin/configure_dm_webapp.sh
+7
-0
7 additions, 0 deletions
sbin/configure_dm_webapp.sh
sbin/create_dm_db.sh
+9
-0
9 additions, 0 deletions
sbin/create_dm_db.sh
with
16 additions
and
0 deletions
sbin/configure_dm_webapp.sh
+
7
−
0
View file @
4304966a
...
...
@@ -13,6 +13,7 @@ MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
if
[
-z
"
${
DM_ROOT_DIR
}
"
]
;
then
DM_ROOT_DIR
=
$MY_DIR
/..
fi
DM_INSTALL_DIR
=
${
DM_INSTALL_DIR
:
=
$DM_ROOT_DIR
/..
}
DM_ENV_FILE
=
${
DM_ROOT_DIR
}
/setup.sh
if
[
!
-f
${
DM_ENV_FILE
}
]
;
then
echo
"Environment file
${
DM_ENV_FILE
}
does not exist."
...
...
@@ -56,6 +57,12 @@ DM_DOMAIN=domain1
echo
"Copying db driver"
rsync
-ar
$DM_ROOT_DIR
/src/java/DmWebPortal/lib/postgresql-9.3-1102.jdbc41.jar
$GLASSFISH_DIR
/glassfish/domains/
${
DM_DOMAIN
}
/lib/ext
# Check password from file
passwordFile
=
$DM_INSTALL_DIR
/etc/
$DM_DB_NAME
.db.passwd
if
[
-f
$passwordFile
]
;
then
DM_DB_PASSWORD
=
`
cat
$passwordFile
`
fi
# restart server
echo
"Restarting glassfish"
$ASADMIN_CMD
stop-domain
${
DM_DOMAIN
}
...
...
This diff is collapsed.
Click to expand it.
sbin/create_dm_db.sh
+
9
−
0
View file @
4304966a
...
...
@@ -27,7 +27,9 @@ cd $CURRENT_DIR
if
[
-z
"
${
DM_ROOT_DIR
}
"
]
;
then
DM_ROOT_DIR
=
$MY_DIR
/..
fi
DM_INSTALL_DIR
=
${
DM_INSTALL_DIR
:
=
$DM_ROOT_DIR
/..
}
DM_SQL_DIR
=
$DM_ROOT_DIR
/db
DM_ETC_DIR
=
$DM_INSTALL_DIR
/etc
DM_RUN_DIR
=
$DM_INSTALL_DIR
/var/run
DM_ENV_FILE
=
${
DM_ROOT_DIR
}
/setup.sh
if
[
!
-f
${
DM_ENV_FILE
}
]
;
then
...
...
@@ -169,6 +171,13 @@ echo "Creating $DM_DB_USER"
createDbUser
$DM_DB_USER
-E
-d
||
exit
1
modifyDbUserPassword
$DM_DB_USER
$DM_DB_USER_PASSWORD
||
exit
1
# Create db password file
mkdir
-p
$DM_ETC_DIR
mkdir
-p
$DM_RUN_DIR
passwordFile
=
$DM_ETC_DIR
/
$DM_DB_NAME
.db.passwd
echo
$DM_DB_USER_PASSWORD
>
$passwordFile
chmod
600
$passwordFile
# Create db
echo
"Creating database:
$DM_DB_NAME
"
createDb
||
exit
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment