mwan3: mwan3rtmon interrupt sleep on signal (trap) event
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 14 Jan 2019 07:24:27 +0000 (08:24 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 14 Jan 2019 07:28:55 +0000 (08:28 +0100)
Sleep will be aborted if a signal is send to this process.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/mwan3/files/usr/sbin/mwan3rtmon

index 667d0cc87263e07c2e79ca0e169c372ca7610b80..afdc96d1a0109f4ae2656028707075072416fa29 100755 (executable)
@@ -25,7 +25,8 @@ main() {
        sleep 3
        while mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6; do
                [ "$rtmon_interval" = "0" ] && break
-               sleep $rtmon_interval
+               sleep "$rtmon_interval" &
+               wait
        done
 }