YunoHost-Apps / hotspot_ynh

Wifi Hotspot app for YunoHost
GNU Affero General Public License v3.0
39 stars 19 forks source link

Reload only NAT rule when OpenVPN is up / down #116

Closed hidrarga closed 8 months ago

hidrarga commented 8 months ago

Problem

For simplicity sake, the OpenVPN is restarting the hotspot each time it goes up or down. The issue is that it takes really long on ARM boards, such as Olimex.

Solution

The idea is to reload only network stuff which have changed after the OpenVPN went up or down. Unless I missed something, we only need to reload the NAT rule…

PR Status

Automatic tests

Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

hidrarga commented 8 months ago

!testme

yunohost-bot commented 8 months ago

Alrighty! Test Badge

hidrarga commented 8 months ago

I removed yunohost helpers in favor of yunohost cli. I don't know if there is a big difference, but the reason I couldn't use it before is that I had to export the PATH variable… And I feel it's better to use the yunohost cli in this case? :shrug: