From 05408208175b3188a3b20a304424ab3027c6728b Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Thu, 14 Oct 2021 02:46:33 +0300 Subject: [PATCH] -Update "installAndRun.sh": -- Check if a gradle installation with the given version already exists, before downloading and installing gradle. -- Make sure the "unzip" package is installed, before trying unzipping the gradle package. - Update the logs' fileName. --- installAndRun.sh | 12 +++++++----- src/main/resources/application.properties | 2 +- src/main/resources/logback-spring.xml | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/installAndRun.sh b/installAndRun.sh index 05a3557..ff6545a 100755 --- a/installAndRun.sh +++ b/installAndRun.sh @@ -12,11 +12,13 @@ gradleVersion="7.2" if [[ justInstall -eq 0 ]]; then - wget https://services.gradle.org/distributions/gradle-${gradleVersion}-bin.zip - - sudo mkdir /opt/gradle - sudo unzip -d /opt/gradle gradle-${gradleVersion}-bin.zip - #ls /opt/gradle/gradle-${gradleVersion} # For debugging installation + if [[ ! -d /opt/gradle/gradle-${gradleVersion} ]]; then + wget https://services.gradle.org/distributions/gradle-${gradleVersion}-bin.zip + echo -e "\nAsking for sudo, in order to install 'gradle'..\n" + sudo mkdir /opt/gradle + sudo apt install -y unzip && sudo unzip -d /opt/gradle gradle-${gradleVersion}-bin.zip + #ls /opt/gradle/gradle-${gradleVersion} # For debugging installation + fi export PATH=$PATH:/opt/gradle/gradle-${gradleVersion}/bin diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d699544..e0b02d7 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -16,10 +16,10 @@ server.port = 1880 server.servlet.context-path=/api # LOGGING LEVELS -spring.output.ansi.enabled=always logging.level.root=WARN logging.level.org.springframework.web=INFO logging.level.eu.openaire.urls_controller=DEBUG +spring.output.ansi.enabled=always ## MULTIPART (MultipartProperties) diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 55ed64f..e3d0adf 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,10 +1,10 @@ - logs/urls_controller.log + logs/UrlsController.log - logs/urls_controller.%i.log.zip + logs/UrlsController.%i.log.zip