-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Launcher
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform 11.1.21
-
Story Points:1
If there are more than one occurrence of nuxeo.log.dir or nuxeo.tmp.dir in nuxeo.conf, nuxeoctl crashes for instance with:
$ ./bin/nuxeoctl mp-list mkdir: impossible de créer le répertoire «/tmp\n»: Permission non accordée cp: impossible de créer le fichier standard '/tmp'$'\n''/tmp/nuxeo-launcher-32689.jar': Aucun fichier ou dossier de ce type Error: Unable to access jarfile /tmp /tmp/nuxeo-launcher-32689.jar
Since, in case of duplicates, we should only care about the last entry, a simple fix would probably be:
diff --git a/nuxeo-distribution/nuxeo-server-tomcat/src/main/resources/tomcat/bin/nuxeoctl b/nuxeo-distribution/nuxeo-server-tomcat/src/main/resources/tomcat/bin/nuxeoctl index f4fabdd..1a9926f 100755 --- a/nuxeo-distribution/nuxeo-server-tomcat/src/main/resources/tomcat/bin/nuxeoctl +++ b/nuxeo-distribution/nuxeo-server-tomcat/src/main/resources/tomcat/bin/nuxeoctl @@ -188,12 +188,12 @@ case $JAVA_VERSION in esac ## nuxeo.log.dir -LOG_DIR=$(grep "^nuxeo.log.dir=" "$NUXEO_CONF" | cut -d= -f2-) +LOG_DIR=$(grep "^nuxeo.log.dir=" "$NUXEO_CONF" | cut -d= -f2- | tail -n 1) # Defaults : ${LOG_DIR:="$NUXEO_HOME"/log} ## nuxeo.tmp.dir -TMP_DIR=$(grep "^nuxeo.tmp.dir=" "$NUXEO_CONF" | cut -d= -f2-) +TMP_DIR=$(grep "^nuxeo.tmp.dir=" "$NUXEO_CONF" | cut -d= -f2- | tail -n 1) # Defaults : ${TMP_DIR:="$NUXEO_HOME"/tmp} # TMPDIR is the canonical Unix environment variable specified in various Unix and similar standards