Files
Linux_post_install/features/autostart.sh
T
Your Name 2a2b4d81d1 feat: add feature-flag subsystem with on-demand features install
- Move autostart.sh from bin/ to features/ so re-installs never reset it
- Add lib/flags.sh (flag_set/clear/is_set/value/list/status) + flag-reader/set/clear CLIs
- install.sh --feature copies features/* to /usr/local/bin with overwrite prompt, sets flags
- postinstall.sh enables autostart.service only when the autostart flag is set
- Document features & flags in README, DEV.md, AGENT_Context_Project.md
2026-08-03 02:40:51 -04:00

15 lines
407 B
Bash
Executable File

#!/usr/bin/env bash
LOG="${HOME:-/root}/.autostart.log"
echo "[$(date)] autostart running" >> "$LOG" 2>/dev/null || true
# Check network connectivity
if ping -c 1 -W 2 8.8.8.8 &>/dev/null; then
echo "[$(date)] Network: online" >> "$LOG" 2>/dev/null || true
else
echo "[$(date)] Network: offline" >> "$LOG" 2>/dev/null || true
fi
echo "[$(date)] autostart complete" >> "$LOG" 2>/dev/null || true