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
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user