This file contains hidden or 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/bash | |
| # Setting up logging | |
| LOGDIR=/var/log | |
| LOG="$LOGDIR/update_check.log" | |
| # Sample | |
| # echo "$(date "+[%Y-%m-%d - %H:%M:%S%p]"): ERROR: " > $LOG 2>&1 | |
| # Since we need JQ for a lot of the clean up of the JSON return let's see if it is installed | |
| if cmd=$(command -v jq); then |
This file contains hidden or 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/bash | |
| set -euo pipefail | |
| usage() { | |
| echo "Usage: $0 [-d YYYY-MM-DD [-c CAMERANAME] [-C]] [-D]" | |
| echo "-d: Date to search in YYYY-MM-DD format" | |
| echo "-c: (Optional) Name of the camera as Frigate knows it" | |
| echo "-C: All cameras (use with -d)" | |
| echo "-D: Show total disk usage per day across all cameras" |
This file contains hidden or 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
| import requests | |
| import json | |
| from datetime import datetime | |
| from datetime import timedelta | |
| lunch_file = "/apps/swag/config/www/lunch_entrees.html" | |
| # Get today's date | |
| date = datetime.now() + timedelta(days=1) | |
| # Get the day of the week name | |
| day_of_week = date.strftime("%A") |