Is there any program or setting which can automatically disable a network connection after 5 minutes when it is enabled manually?
So that the user will have to enable the connection every 5 minutes manually, if they need it more than 5 minutes.
Is there any program or setting which can automatically disable a network connection after 5 minutes when it is enabled manually?
So that the user will have to enable the connection every 5 minutes manually, if they need it more than 5 minutes.
No need to ping google, you can check the status of the network directly with
nmcli
.Here's a script I whipped up for ya real quick:
Just run this script at startup and it will stay running forever, constantly checking for an internet connection, and if it finds one it will disable it 5 minutes later.
Just to archive the answer:
where
eth0
is the connection that is to be disconnected.