Skip to content

Instantly share code, notes, and snippets.

@vrs
Created January 25, 2011 08:02
Show Gist options
  • Save vrs/794647 to your computer and use it in GitHub Desktop.
Save vrs/794647 to your computer and use it in GitHub Desktop.
No Internet for you!
#!/bin/bash
# $@: ircssh, a shell account with irssi running
# xmonad line:
# , ("M-S-i", spawn "gnome-terminal -e 'Skripte/ssh.sh ircssh'")
if [[ `date +%k` -lt 18 || `date +%k` -gt 20 ]]
then
echo "Internet geschlossen, Öffnungszeiten 18 bis 21 Uhr."
read
exit 1
fi
# use compression if useful
if [[ `ifconfig | grep ppp0 | wc -l` == 1 ]]
then
ssh -C $@
else
ssh $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment