diff --git a/seqs/onlyoffice.cfg.example b/seqs/onlyoffice.cfg.example index 7f1018e..3c2b9d1 100644 --- a/seqs/onlyoffice.cfg.example +++ b/seqs/onlyoffice.cfg.example @@ -5,3 +5,4 @@ dockerDns1="80.241.218.68" # https://dismail.de/info.html#dns dockerDns2="46.182.19.48" # https://digitalcourage.de/support/zensurfreier-dns-server dockerDefaultConf="/etc/default/docker" dockerImageName="onlyoffice/documentserver" +dockerSecret= diff --git a/seqs/onlyoffice.sh b/seqs/onlyoffice.sh index 7bf61eb..1c3f94f 100755 --- a/seqs/onlyoffice.sh +++ b/seqs/onlyoffice.sh @@ -94,8 +94,9 @@ step_4() { fi } -step_5_info() { - echo "Install/start onlyoffice docker container ." +step_5_info() { + echoinfoArgs "" + echo "Install/start onlyoffice docker container" echoinfo "If is empty, user input will be available if not run --quiet." echoinfo "$toolName will be run unsecured if no secret was provied." } @@ -106,6 +107,8 @@ step_5() { if [ ! -z "$2" ] ; then secret="$2" + elif [ ! -z "$dockerSecret" ]; then + secret="$dockerSecret" elif [ $QUIET -eq 0 ] ; then exe read -s -p "JWT Secret: " secret fi @@ -115,10 +118,14 @@ step_5() { if [ ! -z "$secret" ] ; then options="-e JWT_ENABLED=true -e JWT_SECRET=" # This is the only way to provide SECRET($2) to docker command line which handles all types of characters. - exe docker run -i -t -d -p ${onlyOfficePort}:80 ${options}"$secret" --restart=always onlyoffice/documentserver + exe docker run -i -t -d -p ${onlyOfficePort}:80 ${options}"$secret" --restart=always \ + -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ + -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ + -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \ + -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql "${dockerImageName}" else echoerr " [W] Running $toolName without JWT (JSON Web Tokens)" - exe docker run -i -t -d -p ${onlyOfficePort}:80 --restart=always onlyoffice/documentserver + exe docker run -i -t -d -p ${onlyOfficePort}:80 --restart=always "${dockerImageName}" fi unset secret @@ -183,5 +190,5 @@ step_102() { esac } -VERSION_SEQREV=8 -. sequencer.sh +VERSION_SEQREV=14 +. /usr/local/bin/sequencer.sh