Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#!/bin/bash echo "Content-type: text/html" echo "" echo 'Bell Rang!!!' echo "" echo "" img="$(date +%s)"; #get time/date stamp for images let h="$(date +%H)"; #get current hour #Create log file echo "====================" >> /tmp/doorbell.log date >> /tmp/doorbell.log echo "Hour: $h" >> /tmp/doorbell.log #if it's between 8AM and 8PM ring bell if [[ "$h" -ge 8 ]] && [[ "$h" -lt 22 ]] then echo "Rang..." >> /tmp/doorbell.log wget -q "
" -O /dev/null & mplayer bell.mp3 > /dev/null & wget -q "
" -O /dev/null & #set ip video 9100a to correct camera wget --user=
--password=
"http://
/SetChannel.cgi?Channel=2" -O /dev/null fi #take 4 photos and upload them for i in `seq 1 4` do wget --user=
--password=
"http://
/Jpeg/CamImg.jpg" -O "../imgs/${img}_${i}.jpg" && curl -X POST -F "file=@../imgs/${img}_${i}.jpg" "https://
/upload.php" -o /dev/null sleep 1 done
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)