فهرست منبع

[bin] Add west cam to webcam capture script

Colin Powell 1 سال پیش
والد
کامیت
69f1daf6db
1فایلهای تغییر یافته به همراه17 افزوده شده و 0 حذف شده
  1. 17 0
      bin/.bin/webcam-capture

+ 17 - 0
bin/.bin/webcam-capture

@@ -0,0 +1,17 @@
+#!/bin/sh
+host = "loge.local"
+
+if [ "$1" = "east" ]; then
+  port=8082
+fi
+
+if [ "$1" = "basement" ]; then
+  port=8081
+fi
+
+if [ "$1" = "west" ]; then
+  port=8081
+  host="atlas.local"
+fi
+
+curl $host:$port/snapshot -o /media/photos/webcams/$1/$(date +%Y%m%d%H%M%S).jpg