mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
Save settings before upgrading
This commit is contained in:
parent
1a9ef49ea5
commit
19a6ae7d64
2 changed files with 11 additions and 1 deletions
|
@ -7,7 +7,7 @@ git clone https://github.com/labriqueinternet/hotspot_ynh.git "${tmpdir}/"
|
|||
git --work-tree "${tmpdir}/" --git-dir "${tmpdir}/.git/" reset --hard "${gitcommit}"
|
||||
|
||||
cd "${tmpdir}/scripts/"
|
||||
./upgrade
|
||||
bash ./upgrade
|
||||
|
||||
sudo rm -r "${tmpdir}/"
|
||||
|
||||
|
|
|
@ -18,10 +18,20 @@ else
|
|||
firmware_nonfree=no
|
||||
fi
|
||||
|
||||
tmpdir=$(mktemp -dp /tmp/ hotspot-upgrade-XXXXX)
|
||||
sudo cp -a /etc/yunohost/apps/hotspot/settings.yml "${tmpdir}/"
|
||||
|
||||
export HOTSPOT_UPGRADE=1
|
||||
sudo bash /etc/yunohost/apps/hotspot/scripts/remove &> /dev/null
|
||||
bash ./install "${domain}" "${path}" "${wifi_ssid}" "${wifi_passphrase}" "${firmware_nonfree}"
|
||||
|
||||
gitcommit=$(ynh_setting hotspot gitcommit)
|
||||
|
||||
sudo cp -a "${tmpdir}/settings.yml" /etc/yunohost/apps/hotspot/
|
||||
sudo rm -r "${tmpdir}/"
|
||||
|
||||
sudo yunohost app setting hotspot gitcommit -v "${gitcommit}"
|
||||
|
||||
# Changes
|
||||
|
||||
if [ "$(ynh_setting hotspot ip6_firewall)" == '' ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue