Bump version to 3.4.9
Adding option to not update supervisor configuration
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
toolName="Mayan EDMS"
|
toolName="Mayan EDMS"
|
||||||
toolVersion="3.4.5"
|
toolVersion="3.4.9"
|
||||||
toolRoot="/opt/mayan-edms"
|
toolRoot="/opt/mayan-edms"
|
||||||
toolMediaFolder="/opt/mayan-edms/media"
|
toolMediaFolder="/opt/mayan-edms/media"
|
||||||
|
|
||||||
@@ -90,9 +90,14 @@ maxmemory-policy allkeys-lru
|
|||||||
save \"\"
|
save \"\"
|
||||||
databases 2"
|
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_alias() { ALIAS="upgrade"; }
|
||||||
step_10() {
|
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 curl -o "$uninstallRemovalsLoc" https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt
|
||||||
exe sudo -u mayan ${toolRoot}/bin/pip uninstall -r "$uninstallRemovalsLoc"
|
exe sudo -u mayan ${toolRoot}/bin/pip uninstall -r "$uninstallRemovalsLoc"
|
||||||
endReturn -o $?
|
endReturn -o $?
|
||||||
@@ -101,8 +106,15 @@ step_10() {
|
|||||||
endReturn -o $?
|
endReturn -o $?
|
||||||
toolScript performupgrade
|
toolScript performupgrade
|
||||||
#toolScript preparestatic --noinput # only < 3.4
|
#toolScript preparestatic --noinput # only < 3.4
|
||||||
# Generating new supervisor file
|
case $1 in
|
||||||
step supervisorconf
|
"nosuper")
|
||||||
|
echo " [I] Skipping supervisor configuration update"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Generating new supervisor file
|
||||||
|
step supervisorconf
|
||||||
|
;;
|
||||||
|
esac
|
||||||
exe systemctl start supervisor
|
exe systemctl start supervisor
|
||||||
}
|
}
|
||||||
uninstallRemovalsLoc="/tmp/removals.txt"
|
uninstallRemovalsLoc="/tmp/removals.txt"
|
||||||
@@ -135,13 +147,14 @@ step_15()
|
|||||||
step_20_info() { echo "Backup postgres database to media folder"; }
|
step_20_info() { echo "Backup postgres database to media folder"; }
|
||||||
step_20_alias() { ALIAS="backupdb"; }
|
step_20_alias() { ALIAS="backupdb"; }
|
||||||
step_20() {
|
step_20() {
|
||||||
local LASTYEAR=$(($(date +%Y)-1))
|
local DELYEAR=$(($(date +%Y)-2))
|
||||||
if [ ! -s ~/.pgpass ] ; then
|
if [ ! -s ~/.pgpass ] ; then
|
||||||
echo " [I] For unattended backup please define ~/.pgpass containing credentials for user mayan"
|
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
|
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"
|
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
|
toolDbBackupFolder=${toolMediaFolder}/backupdb
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user