coova-chilli: execute firewall cleanup at shutdown

Coova Chilli creates "undo" firewall scripts that are intended to be run
when the daemon is shut down. Failure to do so results in leftover
entries in firewall and duplicated ones if chilli is subsequently
restarted.

Execute these scripts when the service stops.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
Thibaut VARÈNE 2022-01-27 12:00:38 +01:00 committed by Rosen Penev
parent 06193dfdd6
commit b1fb66e007
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ start_service() {
}
stop_service() {
for undofile in /var/run/chilli.tun*.sh; do
sh $undofile >& /dev/null
done
rm -f /var/run/chilli_*
}