diff --git a/installAndRun.sh b/installAndRun.sh index ddf21c9..5f6216f 100755 --- a/installAndRun.sh +++ b/installAndRun.sh @@ -55,8 +55,10 @@ if [[ justInstall -eq 0 ]]; then cd libs || exit 4 git clone https://github.com/LSmyrnaios/PublicationsRetriever.git # We assume there is no previously source-code here, if so, it will be overwritten. - # Keep a backup of the existing JAR file. - mv ./publications_retriever-1.0-SNAPSHOT.jar ./publications_retriever-1.0-SNAPSHOT_BACKUP.jar + # Keep a backup of the previous JAR file, if it exists. + if [ -f ./publications_retriever-1.0-SNAPSHOT.jar ]; then + mv ./publications_retriever-1.0-SNAPSHOT.jar ./publications_retriever-1.0-SNAPSHOT_BACKUP.jar + fi cd PublicationsRetriever && sudo apt install -y maven && mvn clean install diff --git a/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java b/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java index ec4f84c..01b0ee4 100644 --- a/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java +++ b/src/main/java/eu/openaire/urls_worker/UrlsWorkerApplication.java @@ -96,6 +96,7 @@ public class UrlsWorkerApplication { } FullTextsController.deleteDirectory(-1); + logger.info("Exiting.."); } @Bean @@ -110,6 +111,7 @@ public class UrlsWorkerApplication { return source; } + @Bean public CommandLineRunner setServerBaseUrl(Environment environment, ServletWebServerApplicationContext webServerAppCtxt) {