Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
4f9d66f8
Commit
4f9d66f8
authored
10 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-535: Keep custom html pages through an openBIS upgrade. (Pages restored by installer)
SVN: 31903
parent
c4137626
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/ExecuteSetupScriptsAction.java
+21
-3
21 additions, 3 deletions
...d/openbis/installer/izpack/ExecuteSetupScriptsAction.java
with
21 additions
and
3 deletions
installation/source/java/ch/systemsx/cisd/openbis/installer/izpack/ExecuteSetupScriptsAction.java
+
21
−
3
View file @
4f9d66f8
...
...
@@ -182,10 +182,28 @@ public class ExecuteSetupScriptsAction extends AbstractScriptExecutor implements
private
void
executRestoreConfigScript
(
AutomatedInstallData
data
)
{
String
script
=
getAdminScript
(
data
,
RESTORE_CONFIG_FROM_BACKUP_SCRIPT
);
String
backupConfigFolder
=
data
.
getVariable
(
GlobalInstallationContext
.
BACKUP_FOLDER_VARNAME
)
+
"/config-backup"
;
String
backupConfigFolder
=
data
.
getVariable
(
GlobalInstallationContext
.
BACKUP_FOLDER_VARNAME
)
+
"/config-backup"
;
executeAdminScript
(
null
,
script
,
backupConfigFolder
);
restoreCustomPagesFolder
(
data
);
}
private
void
restoreCustomPagesFolder
(
AutomatedInstallData
data
)
{
File
backupCustomPagesFolder
=
new
File
(
data
.
getVariable
(
GlobalInstallationContext
.
BACKUP_FOLDER_VARNAME
)
+
"/openBIS-server/jetty/webapps/openbis/custom"
);
if
(!
backupCustomPagesFolder
.
exists
())
{
return
;
}
System
.
out
.
println
(
"Starting restoration of backup Pages Folder: "
+
backupCustomPagesFolder
.
getAbsolutePath
());
File
justInstalledPagesFolder
=
new
File
(
data
.
getVariable
(
GlobalInstallationContext
.
BACKUP_FOLDER_VARNAME
)
+
"/../../servers/openBIS-server/jetty/webapps/openbis/custom"
);
try
{
FileUtils
.
deleteDirectory
(
justInstalledPagesFolder
);
FileUtils
.
copyDirectory
(
backupCustomPagesFolder
,
justInstalledPagesFolder
);
System
.
out
.
println
(
"Finished restoration of backup pages folder."
);
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"Error restoring custom pages folder. "
);
}
}
private
void
executePostInstallationScript
(
AutomatedInstallData
data
)
...
...
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