#=========================================================== # Ubooquity # description "upstart script for Ubooquity" # title : ubooquity.conf # date : 17 07 2017 # version "Ubooquity Version 2.1; java version 1.8.0_121 " # author "Elouan Le Bretton" # original source: adapted from topic in ubooquity forum about special characters # http://ubooquity.userecho.com/topic/907059-comics-not-imported-umlaut-mark-bug/ #============================================================ #============================================================== # Guide # 1: adapt the variables to your environment # 2: save this file as ubooquity.conf in /etc/init # 3: Command line use: # "start ubooquity" to launch ubooquity, # "stop ubooquity" to stop ubooquity # "status ubooquity" to know about the status #============================================================== # automatically start ubooquity after webserver has been started # DSM 5.0 = httpd-user (apache); DSM 6.0 = nginx start on started nginx # stop ubooquity on stop on runlevel [06] # Automatically respawn if ubooquity stops unexpetedly respawn respawn limit 5 500 # expect stop [this seems to be expected sometime but requires testing to be sure) #============================================= # run the scripts as the 'Ubooquity' user; because running as root (the default) is a bad idea. # This requires you create a user named "Ubooquity" on the Synology. # If you don't have a dedicated user, you can put 'http' instead #============================================= setuid Ubooquity script # installation settings JAVA_DIR=/var/packages/Java8/target/j2sdk-image/bin WORK_DIR=/volume1/homes/Ubooquity/.Ubooquity2 PCKG_DIR=/var/packages/Ubooquity PCKG_BIN=Ubooquity.jar # app settings PORT=2202 ADMINPORT=2203 MEM=512m # This ensures that ubooquity reads special characters properly ENCO=UTF-8 LANG=fr_FR.$ENCO export LANG # Main command for ubooquity exec "$JAVA_DIR/java" -Dfile.encoding=$ENCO -Xmx$MEM -jar $PCKG_DIR/$PCKG_BIN --libraryport $PORT --workdir "$WORK_DIR" --adminport $ADMINPORT --remoteadmin --headless end script