diff --git a/seqs/mayan-edms.sh b/seqs/mayan-edms.sh index b418c37..c3a4f74 100755 --- a/seqs/mayan-edms.sh +++ b/seqs/mayan-edms.sh @@ -1,7 +1,7 @@ #!/bin/bash toolName="Mayan EDMS" -toolVersion="3.2.11" +toolVersion="3.3.2" toolRoot="/opt/mayan-edms" toolMediaFolder="/opt/mayan-edms/media" @@ -19,9 +19,9 @@ step_1() { step_2_info() { echo "Get $toolName binary dependencies"; } step_2() { - exe apt install g++ gcc ghostscript gnupg1 graphviz libfuse2 \ + exe apt install exiftool g++ gcc ghostscript gnupg1 graphviz libfuse2 \ libjpeg-dev libmagic1 libpq-dev libpng-dev libtiff-dev \ - poppler-utils postgresql python-dev python-virtualenv redis-server \ + poppler-utils postgresql python3-dev python3-virtualenv redis-server \ sane-utils supervisor tesseract-ocr tesseract-ocr-deu zlib1g-dev -y } @@ -29,7 +29,7 @@ step_3_info() { echo "Create virtual environment"; } step_3() { exe adduser mayan --disabled-password --disabled-login --no-create-home --gecos -G users"" exe mkdir -p ${toolRoot} - exe virtualenv ${toolRoot} + exe virtualenv ${toolRoot} -p $(which python3) saveReturn $? endReturn exe chown -R mayan:mayan ${toolRoot} @@ -50,7 +50,7 @@ step_5() { exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 mayan-edms saveReturn $? endReturn - exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 psycopg2==2.7.3.2 redis==2.10.6 + exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 psycopg2==2.8.3 redis==3.2.1 saveReturn $? endReturn @@ -64,11 +64,10 @@ step_6_info() { echo "Supervisord configuration for $toolName"; } step_6() { addConf -c "" "$supervisordConfLoc" toolScript "platformtemplate supervisord > ${supervisordConfLoc}" - exe sed -i "s/\(^ *MAYAN_DATABASE_PASSWORD=\)\(.*\),$/\1\"\2\",/" "${supervisordConfLoc}" } supervisordConfLoc="/etc/supervisor/conf.d/mayan.conf" -step_7_info() { echo "$toolName configuration file"; } +step_7_info() { echo "Redis configuration file"; } step_7() { addConf -a "$redisConf" "$redisConfLoc" @@ -82,7 +81,7 @@ redisConfLoc="/etc/redis/redis.conf" redisConf="\ maxmemory-policy allkeys-lru save \"\" -databases 1" +databases 2" step_10_info() { echo "Update $toolName"; } step_10_alias() { ALIAS="update"; } @@ -168,11 +167,12 @@ toolScript() { if [ ! -z "$1" ] ; then readDatabaseInfos fi - exep "sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=${postgresDb} \ - MAYAN_DATABASE_PASSWORD=\"${postgresPass}\" MAYAN_DATABASE_USER=${postgresUser} \ - MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=${toolMediaFolder} \ + + exep "sudo -u mayan \ + MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'${postgresDb}','PASSWORD':'${postgresPass}','USER':'${postgresUser}','HOST':'127.0.0.1'}}\" \ + MAYAN_MEDIA_ROOT=${toolMediaFolder} \ ${toolRoot}/bin/mayan-edms.py $*" } -VERSION_SEQREV=4 +VERSION_SEQREV=6 . sequencer.sh