Created
March 17, 2011 20:48
-
-
Save padenot/875097 to your computer and use it in GitHub Desktop.
Du blocage de l'internet pendant quelque minutes, ou comment gagner en productivité
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
time=$(zenity --text="On bloque le net combien de temps ?" --scale --value=60 --min-value=1 --max-value=600) | |
echo $time | |
network_interface=$(ifconfig | grep Link | tr -s ' ' | cut -d ' ' -f1) | |
for i in $network_interface | |
do | |
if [ $i != "lo" ] | |
then | |
ifconfig $i down | |
fi | |
done | |
sleep $time | |
for i in $network_interface | |
do | |
ifconfig $i up | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment