Skip to content

Commit

Permalink
Ref EliasKotlyar#727 - Allow snapshot filename to ne configured in mo…
Browse files Browse the repository at this point in the history
…tion.conf (EliasKotlyar#737)
  • Loading branch information
Dopeyr authored and jmtatsch committed Oct 12, 2018
1 parent 4c8e49c commit 2980f69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions firmware_mod/config/motion.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ publish_mqtt_message=false
sendemail=false
send_telegram=false
save_dir=/system/sdcard/motion/stills
save_file_date_pattern="+%d-%m-%Y_%H.%M.%S"
3 changes: 2 additions & 1 deletion firmware_mod/scripts/detectionOn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ fi

# Save a snapshot
if [ "$save_snapshot" = true ] ; then
filename=$(date +%d-%m-%Y_%H.%M.%S).jpg
pattern="${save_file_date_pattern:-+%d-%m-%Y_%H.%M.%S}"
filename=$(date $pattern).jpg
if [ ! -d "$save_dir" ]; then
mkdir -p "$save_dir"
fi
Expand Down

0 comments on commit 2980f69

Please sign in to comment.