1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Don't store packages in settings

This commit is contained in:
Kayou 2019-02-26 01:27:39 +01:00
parent e376c50ad6
commit b3ed0f43af
No known key found for this signature in database
GPG key ID: 823A2CBE071D3126
3 changed files with 7 additions and 12 deletions

View file

@ -212,7 +212,6 @@ ynh_app_setting_set $app ip4_dns1 80.67.169.12
ynh_app_setting_set $app ip4_nat_prefix 10.0.242
ynh_app_setting_set $app vpnclient no
ynh_app_setting_set $app service_name $service_name
ynh_app_setting_set $app packages $packages
if [[ -z $wifi_device ]]; then
ynh_app_setting_set $app service_enabled 0

View file

@ -47,6 +47,7 @@ final_path=$(ynh_app_setting_get $app final_path)
if yunohost service status $service_name >/dev/null 2>&1
then
ynh_print_info "Removing $app service"
yunohost service stop $service_name
yunohost service remove $service_name
fi

View file

@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path)
final_path=$(ynh_app_setting_get $app final_path)
firmware_nonfree=$(ynh_app_setting_get $app firmware_nonfree)
packages=$(ynh_app_setting_get $app packages)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
@ -33,16 +32,6 @@ if [ -z $final_path ]; then
ynh_app_setting_set $app final_path $final_path
fi
if [ -z $packages ]; then
if [[ $firmware_nonfree -eq 1 ]]; then
packages=$nonfree_packages
else
packages=$free_packages
fi
ynh_app_setting_set $app packages $packages
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -87,6 +76,12 @@ ynh_add_nginx_config
#=================================================
ynh_print_info "Upgrading dependencies..."
if [[ $firmware_nonfree -eq 1 ]]; then
packages=$nonfree_packages
else
packages=$free_packages
fi
ynh_install_app_dependencies "$pkg_dependencies" "$packages"
#=================================================