mirror of
https://github.com/YunoHost-Apps/wireguard_ynh.git
synced 2024-09-03 20:35:58 +02:00
[fix] close ports upon removal
This commit is contained in:
parent
d52f7365f8
commit
8b600e53d1
1 changed files with 11 additions and 0 deletions
|
@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
port_wg=$(ynh_app_setting_get --app=$app --key=port_wg)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
#=================================================
|
||||
|
@ -82,6 +83,16 @@ ynh_script_progression --message="Removing logrotate configuration..." --time --
|
|||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
# CLOSE WIREGUARD PORT
|
||||
#=================================================
|
||||
|
||||
if yunohost firewall list | grep -q "\- $port_wg$"
|
||||
then
|
||||
ynh_script_progression --message="Closing port $port_wg..." --time --weight=1
|
||||
ynh_exec_warn_less yunohost firewall disallow TCP $port_wg
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue