Clarify .env vs sky-cam.conf split for toggles and private values
Rule is now consistent throughout:
- *_ENABLED flags are plain true/false in sky-cam.conf — flip them there
- Private values (URLs, credentials, location) go in .env only
sky-cam.conf:
- NTFY_ENABLED, EMAIL_ENABLED, MM_NOTIFY_ENABLED are now plain false (not
using the ${VAR:-} pattern, which implied they could go in .env)
- NTFY_URL, EMAIL_TO, EMAIL_FROM, MM_NOTIFY_CHANNEL_ID use ${VAR:-} pattern
so they are set in .env
- LATITUDE/LONGITUDE comment clarified with example .env lines
install.sh .env.example: updated notification comment to match
https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+3
-2
@@ -280,10 +280,11 @@ env_example="$HERE/.env.example"
|
||||
echo "channel_id=your-daily-upload-channel-id-here"
|
||||
echo ""
|
||||
echo "# ── Notifications ───────────────────────────────────────────────────────────"
|
||||
echo "# Also set NTFY_ENABLED=true / EMAIL_ENABLED=true / MM_NOTIFY_ENABLED=true"
|
||||
echo "# in sky-cam.conf to activate the method."
|
||||
echo "# Set the private values here, then flip the matching *_ENABLED toggle"
|
||||
echo "# to true in sky-cam.conf."
|
||||
echo "#NTFY_URL=https://ntfy.sh/your-topic"
|
||||
echo "#EMAIL_TO=you@example.com"
|
||||
echo "#EMAIL_FROM=skycam@localhost"
|
||||
echo "#MM_NOTIFY_CHANNEL_ID=your-notify-channel-id-here"
|
||||
} > "$env_example"
|
||||
echo " wrote .env.example (cp .env.example .env then fill in real values)"
|
||||
|
||||
+19
-13
@@ -158,13 +158,16 @@ MUSIC_DIR="${MUSIC_DIR:-$SCRIPT_DIR/music}"
|
||||
# Google Maps — right-click your location → the first item shown is "lat, lon"
|
||||
# Or: maps.google.com, drop a pin, coordinates appear in the URL and sidebar
|
||||
#
|
||||
# TIMEZONE must be a valid IANA name. Look yours up at:
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# (use the value in the "TZ identifier" column, e.g. America/Chicago)
|
||||
# ── Location & timezone ───────────────────────────────────────────────────────
|
||||
# Set your real values in .env — do not put exact coordinates here since
|
||||
# this file is committed to git. Add these three lines to your .env:
|
||||
#
|
||||
# Set your real values in .env — these placeholder defaults keep the file
|
||||
# shareable without leaking your exact location.
|
||||
LATITUDE="${LATITUDE:-25.0000}"
|
||||
# LATITUDE=43.1234
|
||||
# LONGITUDE=-76.5678
|
||||
# TIMEZONE=America/Chicago
|
||||
#
|
||||
# Placeholder values below are used only if .env has not set them.
|
||||
LATITUDE="${LATITUDE:-0.0000}"
|
||||
LONGITUDE="${LONGITUDE:-0.0000}"
|
||||
TIMEZONE="${TIMEZONE:-America/New_York}"
|
||||
|
||||
@@ -336,19 +339,22 @@ AMBIENT_RETENTION_DAYS=30 # delete files older than this; 0 = keep
|
||||
# ntfy — push notifications, zero signup for self-hosted or free cloud tier:
|
||||
# Self-hosted: https://docs.ntfy.sh/install/
|
||||
# Cloud: pick any topic name at ntfy.sh (no account needed)
|
||||
NTFY_ENABLED="${NTFY_ENABLED:-false}"
|
||||
NTFY_URL="${NTFY_URL:-}" # set in .env — keeps your topic URL out of git
|
||||
# Set NTFY_URL=https://ntfy.sh/your-topic in .env, then flip the toggle below.
|
||||
NTFY_ENABLED=false
|
||||
NTFY_URL="${NTFY_URL:-}"
|
||||
|
||||
# Email — requires the 'mail' command (package: mailutils or s-nail).
|
||||
# Configure outbound SMTP via /etc/ssmtp/ssmtp.conf or msmtp.
|
||||
#EMAIL_ENABLED=true
|
||||
#EMAIL_TO=you@example.com
|
||||
#EMAIL_FROM=skycam@localhost
|
||||
# Set EMAIL_TO and EMAIL_FROM in .env, then flip the toggle below.
|
||||
EMAIL_ENABLED=false
|
||||
EMAIL_TO="${EMAIL_TO:-}"
|
||||
EMAIL_FROM="${EMAIL_FROM:-skycam@localhost}"
|
||||
|
||||
# Mattermost text post — reuses mattermost_url and access_token above.
|
||||
# Can be the same daily channel or a separate admin/private channel.
|
||||
#MM_NOTIFY_ENABLED=true
|
||||
#MM_NOTIFY_CHANNEL_ID=your-notify-channel-id-here
|
||||
# Set MM_NOTIFY_CHANNEL_ID in .env, then flip the toggle below.
|
||||
MM_NOTIFY_ENABLED=false
|
||||
MM_NOTIFY_CHANNEL_ID="${MM_NOTIFY_CHANNEL_ID:-}"
|
||||
|
||||
# ── Credentials (.env override) ───────────────────────────────────────────────
|
||||
# Sensitive values (RTSP URLs with passwords, API tokens) can be kept out of
|
||||
|
||||
Reference in New Issue
Block a user