mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
linux - fix missing files when upgrading with dev/testing
This commit is contained in:
parent
08655350b6
commit
86ee2a9745
2 changed files with 2 additions and 14 deletions
|
|
@ -128,13 +128,7 @@ 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
|
||||
VERSION=$(dpkg-query -W -f='${Version}' bunkerweb)
|
||||
if ! [[ "$VERSION" =~ ^1\.5 ]]; 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
|
||||
fi
|
||||
# Copy env and db
|
||||
cp -f /etc/bunkerweb/variables.env /var/tmp/variables.env
|
||||
cp -f /etc/bunkerweb/ui.env /var/tmp/ui.env
|
||||
cp -f /var/lib/bunkerweb/db.sqlite3 /var/tmp/db.sqlite3
|
||||
|
|
|
|||
|
|
@ -130,13 +130,7 @@ 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, we need to copy the variables.env file
|
||||
VERSION=$(rpm -q --queryformat '%{VERSION}' bunkerweb)
|
||||
if ! [[ "$VERSION" =~ ^1\.5 ]]; 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
|
||||
fi
|
||||
# Copy env and db
|
||||
cp -f /etc/bunkerweb/variables.env /var/tmp/variables.env
|
||||
cp -f /etc/bunkerweb/ui.env /var/tmp/ui.env
|
||||
cp -f /var/lib/bunkerweb/db.sqlite3 /var/tmp/db.sqlite3
|
||||
|
|
|
|||
Loading…
Reference in a new issue