0
Answered
Ubooquity Synology Set up Problem
Hello guys,
I've been trying to set up Ubooquity with my Synology but with no luck. I am using "User Defined Script" for DSM 6 with Java 8. I am getting error "/usr/bin/env: bash: No such file or directory". I have tried everything but st,
My current ubooquity.sh is below:
#!/usr/bin/env bash
#title : ubooquity.sh
#description : Launch ubooquity server. shell script in task manager
#date : 20170807
#==============================================================================
### JAVA VARIABLES ###
# Java installation directory
JAVA_DIR=/var/packages/java8/target/j2sdk-image/jre/bin
# Maximum size of the Java runtime memory allocation pool. Default: 64MB
MEM=512m
### UBOOQUITY VARIABLES ###
# Ubooquity binary location
UBOOQUITY_BIN=/volume1/Internal/Ubooquity/Ubooquity.jar
# Ubooquity working directory
WORK_DIR=/volume1/Gulibu/
# 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
# 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
Customer support service by UserEcho
Okay, fixed the problem.
For those who are having the same problem.
Open ubooquity.sh with notebook++
edit
EOL Conversion
Select Linux
Additionally, JAVA_DIR is case sensitive for some reason. java8 to Java8
it is now running.
Thanks for the feedback.
I have updated the ubooquity.sh file on the webiste (line separators were CRLF instead of LF), no point in having a bash script with Windows line separators.
Here is mine, on Syno DS216play: