mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Update update-version script and bw version in after-remove scripts
This commit is contained in:
parent
b8778de08b
commit
8bada2a02d
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue