• I installed JAVA 8
• I have planned an activity activated with "user-defined script"
• I then activated it using the following ubooquity.sh script
Codice: Seleziona tutto
#!/usr/bin/env bash
#title : ubooquity.sh
#description : Launch ubooquity server. shell script in task manager
#date : 2021 April
#==============================================================================
### JAVA VARIABLES ###
# Java installation directory
JAVA_DIR=/var/packages/Java8/target/j2sdk-image/jre
# Maximum size of the Java runtime memory allocation pool. Default: 64MB
MEM=512m
### UBOOQUITY VARIABLES ###
# Ubooquity binary location
UBOOQUITY_BIN=/var/packages/Ubooquity/Ubooquity.jar
# Ubooquity working directory
WORK_DIR=/volume1/Ubooquity
# Ubooquity process ID file location
PID_FILE=$WORK_DIR/ubooquity.pid
# Ubooquity library port
LIB_PORT=2202
# Ubooquity administration port
ADMIN_PORT=2203
### ENVIRONMENT VARIABLES ###
# Character encoding
ENCO=UTF-8
# Locale selection
LANG=en_US.$ENCO
### SCRIPT ###
# Workaround to read special characters properly
export LANG=en_US.$ENCO
# Kill previous process
if [ -f $PID_FILE ]; then
pkill -F $PID_FILE > /dev/null 2>&1
fi
# Launch ubooquity
printf "Starting Ubooquity server...\n"
$JAVA_DIR/java -jar -Dfile.encoding=$ENCO -Xmx$MEM $UBOOQUITY_BIN \
--adminport $ADMIN_PORT --libraryport $LIB_PORT \
--workdir $WORK_DIR \
--remoteadmin --headless & UBOOQUITY_PID=$!
echo $UBOOQUITY_PID > $PID_FILE
printf "Ubooquity is now running (pid: %d).\n" $UBOOQUITY_PID
exit 0
/volume1/Ubooquity/ubooquity.sh: line 43: syntax error: unexpected end of file
I also replaced the following line in the script
JAVA_DIR=/var/packages/java/target/bin
But the error is till the same.
what's the mistake?