|
@@ -1,15 +1,15 @@
|
|
#!/bin/sh
|
|
#!/bin/sh
|
|
-if [ "$1" = "frontyard" ]; then
|
|
|
|
|
|
+if [ "$1" = "mailbox" ]; then
|
|
host="loge.local"
|
|
host="loge.local"
|
|
- port=8082
|
|
|
|
|
|
+ port=8083
|
|
fi
|
|
fi
|
|
if [ "$1" = "basement_table" ]; then
|
|
if [ "$1" = "basement_table" ]; then
|
|
host="loge.local"
|
|
host="loge.local"
|
|
port=8081
|
|
port=8081
|
|
fi
|
|
fi
|
|
-if [ "$1" = "mailbox" ]; then
|
|
|
|
|
|
+if [ "$1" = "frontyard" ]; then
|
|
host="loge.local"
|
|
host="loge.local"
|
|
- port=8083
|
|
|
|
|
|
+ port=8082
|
|
fi
|
|
fi
|
|
if [ "$1" = "house" ]; then
|
|
if [ "$1" = "house" ]; then
|
|
port=8083
|
|
port=8083
|
|
@@ -28,17 +28,21 @@ if [ "$1" = "bulkhead" ]; then
|
|
host="kiviuq.local"
|
|
host="kiviuq.local"
|
|
fi
|
|
fi
|
|
if [ "$1" = "backyard" ]; then
|
|
if [ "$1" = "backyard" ]; then
|
|
- port=8083
|
|
|
|
|
|
+ port=8084
|
|
host="paaliaq.local"
|
|
host="paaliaq.local"
|
|
fi
|
|
fi
|
|
if [ "$1" = "backyard_low" ]; then
|
|
if [ "$1" = "backyard_low" ]; then
|
|
port=8081
|
|
port=8081
|
|
host="paaliaq.local"
|
|
host="paaliaq.local"
|
|
fi
|
|
fi
|
|
-if [ "$1" = "basement_extension" ]; then
|
|
|
|
|
|
+if [ "$1" = "backyard_north" ]; then
|
|
port=8082
|
|
port=8082
|
|
host="paaliaq.local"
|
|
host="paaliaq.local"
|
|
fi
|
|
fi
|
|
|
|
+if [ "$1" = "basement_extension" ]; then
|
|
|
|
+ port=8083
|
|
|
|
+ host="paaliaq.local"
|
|
|
|
+fi
|
|
if [ "$1" = "diningroom" ]; then
|
|
if [ "$1" = "diningroom" ]; then
|
|
port=8082
|
|
port=8082
|
|
host="kari.local"
|
|
host="kari.local"
|
|
@@ -51,18 +55,26 @@ if [ "$1" = "christmas_tree" ]; then
|
|
port=8083
|
|
port=8083
|
|
host="mimas.local"
|
|
host="mimas.local"
|
|
fi
|
|
fi
|
|
-if [ "$1" = "backyard_high" ]; then
|
|
|
|
- port=8082
|
|
|
|
- host="geforce.local"
|
|
|
|
-fi
|
|
|
|
if [ "$1" = "orchard" ]; then
|
|
if [ "$1" = "orchard" ]; then
|
|
port=8081
|
|
port=8081
|
|
host="mobian.local"
|
|
host="mobian.local"
|
|
fi
|
|
fi
|
|
|
|
+if [ "$1" = "chicks" ]; then
|
|
|
|
+ port=8083
|
|
|
|
+ host="iapetus.local"
|
|
|
|
+fi
|
|
|
|
+if [ "$1" = "garage" ]; then
|
|
|
|
+ port=8082
|
|
|
|
+ host="iapetus.local"
|
|
|
|
+fi
|
|
|
|
+if [ "$1" = "barn" ]; then
|
|
|
|
+ port=8081
|
|
|
|
+ host="pan.local"
|
|
|
|
+fi
|
|
|
|
|
|
ROOT="/var/photos/misc/webcams"
|
|
ROOT="/var/photos/misc/webcams"
|
|
filepath="$1/$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%Y%m%d%H%M%S).jpg"
|
|
filepath="$1/$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%Y%m%d%H%M%S).jpg"
|
|
mkdir -p /$ROOT/$1/$(date +%Y)/$(date +%m)/$(date +%d)/
|
|
mkdir -p /$ROOT/$1/$(date +%Y)/$(date +%m)/$(date +%d)/
|
|
curl $host:$port/snapshot -o /$ROOT/$filepath
|
|
curl $host:$port/snapshot -o /$ROOT/$filepath
|
|
url="https://files.lab.unbl.ink/webcams/$filepath"
|
|
url="https://files.lab.unbl.ink/webcams/$filepath"
|
|
-curl -H prio:low -H "click:$url" -d "Captured photo from $1 successfully" https://ntfy.unbl.ink/webcams
|
|
|
|
|
|
+#curl -H prio:low -H "click:$url" -d "Captured photo from $1 successfully" https://ntfy.unbl.ink/webcams
|