Last active
October 19, 2017 03:06
-
-
Save onokatio/dd9ccc24d7f32586286aef98d62301af to your computer and use it in GitHub Desktop.
NetowrkManagerで特定のWiFiに繋がったタイミングで自動でコマンドを実行させる ref: http://qiita.com/onokatio/items/d9297e567e9cc75586ed
This file contains hidden or 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/bash | |
| if [ "$1" == wlan0 ] && iwconfig wlan0|grep HogeHogeAccessPoint; then | |
| if ! ps ax|grep "[s]sh -fND 8080"; then | |
| ssh -fND 8080 [email protected] -i /home/onokatio/.ssh/id_rsa -o "StrictHostKeyChecking no" | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment