Update update-version script and bw version in after-remove scripts

This commit is contained in:
Théophile Diot 2023-08-14 14:59:38 -04:00
parent b8778de08b
commit 8bada2a02d
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
3 changed files with 5 additions and 5 deletions

View file

@ -26,6 +26,6 @@ for test in tests/core/* ; do
sed -i "s@${OLD_VERSION}@${NEW_VERSION}@g" ${test}/docker-compose.yml
done
# linux
sed -i "s@${OLD_VERSION}@${NEW_VERSION}@g" src/linux/scripts*.sh
sed -i "s@${OLD_VERSION}@${NEW_VERSION}@g" src/linux/scripts/*.sh
# db
sed -i "s@${OLD_VERSION}@${NEW_VERSION}@g" src/common/db/model.py

View file

@ -128,9 +128,9 @@ elif [ "$1" = "purge" ]; then
purge
else
echo "Package is being upgraded"
# Check the version of the package and if it's inferior to 1.5.0, we need to copy the variables.env file
# Check the version of the package and if it's inferior to 1.5.1, we need to copy the variables.env file
VERSION=$(dpkg-query -W -f='${Version}' bunkerweb)
if [ "$VERSION" <= "1.5.0" ]; then
if [ "$VERSION" != "1.5.1" ]; then
echo " Copyenv variables to /var/tmp/bunkerweb/*.env"
do_and_check_cmd cp -f /opt/bunkerweb/variables.env /var/tmp/variables.env
do_and_check_cmd cp -f /opt/bunkerweb/ui.env /var/tmp/ui.env

View file

@ -130,9 +130,9 @@ if [ "$1" = "0" ]; then
purge
elif [ "$1" = "1" ]; then
echo "Package is being upgraded"
# Check the version of the package and if it's inferior to 1.5.0, we need to copy the variables.env file
# Check the version of the package and if it's inferior to 1.5.1, we need to copy the variables.env file
VERSION=$(rpm -q --queryformat '%{VERSION}' bunkerweb)
if [ "$VERSION" <= "1.5.0" ]; then
if [ "$VERSION" <= "1.5.1" ]; then
echo " Copy /etc/bunkerweb/variables.env to /var/tmp/bunkerweb/variables.env"
do_and_check_cmd cp -f /opt/bunkerweb/variables.env /var/tmp/variables.env
do_and_check_cmd cp -f /opt/bunkerweb/ui.env /var/tmp/ui.env