Bump version to 3.4.9

Adding option to not update supervisor configuration
This commit is contained in:
2020-05-26 17:26:37 +02:00
parent 74b9ce31d2
commit d0cdd8d271

View File

@@ -1,7 +1,7 @@
#!/bin/bash
toolName="Mayan EDMS"
toolVersion="3.4.5"
toolVersion="3.4.9"
toolRoot="/opt/mayan-edms"
toolMediaFolder="/opt/mayan-edms/media"
@@ -90,9 +90,14 @@ maxmemory-policy allkeys-lru
save \"\"
databases 2"
step_10_info() { echo "Upgrade $toolName to $toolVersion"; }
step_10_info() {
echo "Upgrade $toolName to $toolVersion [OPTIONS]"
echoinfo " [OPTIONS]"
echoinfo " nosuper : skip supervisor configuration generation"
}
step_10_alias() { ALIAS="upgrade"; }
step_10() {
shift # don't need the step number
exe curl -o "$uninstallRemovalsLoc" https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt
exe sudo -u mayan ${toolRoot}/bin/pip uninstall -r "$uninstallRemovalsLoc"
endReturn -o $?
@@ -101,8 +106,15 @@ step_10() {
endReturn -o $?
toolScript performupgrade
#toolScript preparestatic --noinput # only < 3.4
# Generating new supervisor file
step supervisorconf
case $1 in
"nosuper")
echo " [I] Skipping supervisor configuration update"
;;
*)
# Generating new supervisor file
step supervisorconf
;;
esac
exe systemctl start supervisor
}
uninstallRemovalsLoc="/tmp/removals.txt"
@@ -135,13 +147,14 @@ step_15()
step_20_info() { echo "Backup postgres database to media folder"; }
step_20_alias() { ALIAS="backupdb"; }
step_20() {
local LASTYEAR=$(($(date +%Y)-1))
local DELYEAR=$(($(date +%Y)-2))
if [ ! -s ~/.pgpass ] ; then
echo " [I] For unattended backup please define ~/.pgpass containing credentials for user mayan"
echo " e.g. localhost:5432:mayan:mayan:pass4mayan"
echo "Backup custom pg format with standard user / database: mayan / mayan"
fi
echo "Backup custom pg format with standard user / database: mayan / mayan"
exep "pg_dump -h 127.0.0.1 -U mayan -Fc mayan | bzip2 -c > ${toolDbBackupFolder}/`date +%Y-%m-%d\"_\"%H-%M-%S`.backup.bz2"
exe rm -f ${toolDbBackupFolder}/${LASTYEAR}*
exe rm -f ${toolDbBackupFolder}/${DELYEAR}*
}
toolDbBackupFolder=${toolMediaFolder}/backupdb