Skip to content

Commit

Permalink
Fix startup errors with embedded Tomcat deployments (#772)
Browse files Browse the repository at this point in the history
- Be less strict about labkeyServer jar file name
- Fix typo in property name: smtpStartTlsEnable
- Don't attempt to delete a non-existent backup
  • Loading branch information
labkey-tchad authored Mar 18, 2024
1 parent e83ea68 commit f6832a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/configs/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mail.smtpPort=@@smtpPort@@
mail.smtpUser=@@smtpUser@@
#mail.smtpFrom=@@smtpFrom@@
#mail.smtpPassword=@@smtpPassword@@
#mail.startTlsEnable=@@smtpStartTlsEnable@@
#mail.smtpStartTlsEnable=@@smtpStartTlsEnable@@
#mail.smtpSocketFactoryClass=@@smtpSocketFactoryClass@@
#mail.smtpAuth=@@smtpAuth@@

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mail.smtpPort=25
mail.smtpUser=Anonymous
#mail.smtpFrom=@@smtpFrom@@
#mail.smtpPassword=@@smtpPassword@@
#mail.startTlsEnable=@@smtpStartTlsEnable@@
#mail.smtpStartTlsEnable=@@smtpStartTlsEnable@@
#mail.smtpSocketFactoryClass=@@smtpSocketFactoryClass@@
#mail.smtpAuth=@@smtpAuth@@

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public EmbeddedExtractor()
{
File[] files = currentDir.listFiles(file -> {
String name = file.getName().toLowerCase();
return name.endsWith(".jar") && name.contains("labkeyserver");
return name.endsWith(".jar") && !name.contains("embedded") && !name.contains("labkeybootstrap");
});

if (files == null || files.length == 0)
Expand Down Expand Up @@ -295,7 +295,10 @@ private void backupExistingDistribution(File webAppLocation)
if (toBackup.stream().anyMatch(File::exists))
{
File backupDir = new File(verifyJar().getParentFile(), "backup");
FileUtils.forceDelete(backupDir); // Delete existing backup
if (backupDir.exists())
{
FileUtils.forceDelete(backupDir); // Delete existing backup
}

for (File f : toBackup)
{
Expand Down

0 comments on commit f6832a1

Please sign in to comment.