Last active
December 15, 2015 14:49
-
-
Save shayelkin/5277066 to your computer and use it in GitHub Desktop.
Take a photo from webcam when connected to a wifi network with a given SSID.
Combine with cron to have your picture taken every N minutes.
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 | |
allowed_ssid="everything" | |
capture_path="$HOME/captures" | |
# only take a photo when at work (connected to work network) | |
check_wireless=$(/sbin/iwconfig wlan0 | grep "ESSID:\"$allowed_ssid\"") | |
if [ -n "$check_wireless" ]; then | |
streamer -s 1280x720 -f jpeg -o "$capture_path/$(date +%Y%m%d.%H%M).jpeg" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment