Non riesco a far partire sul mio nuovo NAS DS920+ applicativo Java di nome Ubooquity

Language plugins e scripts (Java, Node.js, Pearl, PHP, Python, Ruby, ?sh)
Rispondi
Sergio_gal
Utente
Utente
Messaggi: 1
Iscritto il: giovedì 29 aprile 2021, 23:07

Non riesco a far partire sul mio nuovo NAS DS920+ applicativo Java di nome Ubooquity

Messaggio da Sergio_gal »

A Java application named Ubooquity (which is used to view and organize comics and books) does not work on my new NAS DS920+ .
• 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
• I received the following error and the application does not start

/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?
Avatar utente
dMajo
Moderatore
Moderatore
Messaggi: 1962
Iscritto il: sabato 18 agosto 2012, 23:14
Località: FVG - Italia

Re: Non riesco a far partire sul mio nuovo NAS DS920+ applicativo Java di nome Ubooquity

Messaggio da dMajo »

I've edited your post by placing the script in the 'code' section. You need to use the '</>' button to encapsulate properly the code end preserve its correct spacing format and indentations.

You refer to an error at line 43 which doesn't exist since 'exit 0' (after copy&paste to notepad++) becomes line number 42. Obviously you have not posted correctly your code and/or you've done the same mistake with the script.
When you edit the scripts on your nas use eg notepad++ because the windows builtin notepad doesn't handle correctly line terminations. The NAS is running on linux OS.
Dal 01.01.2015 non rispondo a quesiti tecnici dei non osservanti il regolamento https://www.synologyitalia.com/presentazioni/regolamento-leggere-prima-di-postare-t5062.html

  • UPS: APC SMT2200I+AP9631
  • GTW: Vigor2866Vac(4.4.2): 2StaticIP FTTH(1/.1G)+FTTC(30/3M) :o
  • SWC: Netgear GS728TPv2(PoE+)
    • 4x HP NJ2000G
    • 2x Netgear GS108Tv2
    • 2x VigorAP902
  • NAS: DS1819+: DSM6.2.4(u7),32GB; C(2x845DCPro),R5(3xST6000VN001),R0(2xWD60PURX),VB(WD60EFRX);LAN:LAG(1+2),3,4 :D
    • DS1815+: DSM6.2.4(u7),16GB; R5(3xWD60EFRX),VB(2xWD60EFRX);LAN:LAG(1+2),3
    • RS3617xs+: DSM6.2.4(u7),8GB; R6(8xWD40FFWX),HS(WD40FFWX);LAN:LAG(1+2+3),4,LAG(5+6)
    • DS1513+(4GB); DS115j
  • ALTRO: Denon AVR-4311
    • UE55ES8000Q, UE32ES6800Q, UE22F5410AY
    • Galaxy Note8, A5, TabS3; Nokia N8
  • EXP: E5: NET9 PC:W9,M0,L6

www.alldataee.com
Rispondi

Torna a “Language plugins e scripts (Java, Node.js, Pearl, PHP, Python, Ruby, ?sh)”