initial commit

This commit is contained in:
2026-04-07 15:46:18 -04:00
commit bc1b1d1232
43 changed files with 1627 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# Copies system config files into the repo and commits if anything changed.
# File mapping is defined in system/tracked-configs.
# Intended to run via cron (e.g., daily).
set -euo pipefail
REPO="/opt/argento"
# Copy each tracked config into the repo
while IFS=: read -r src dest; do
[ -z "$src" ] && continue
[[ "$src" = \#* ]] && continue
if [ -f "$src" ]; then
cp "$src" "$REPO/$dest"
fi
done < "$REPO/system/tracked-configs"
sed -i 's/^password .*/password REDACTED/' "$REPO/system/msmtprc"
# Sync root crontab
crontab -l > "$REPO/system/root-crontab" 2>/dev/null || true
cd "$REPO"
# Stage and check if anything changed
git add system/
if git diff --cached --quiet; then
exit 0
fi
git commit -m "auto: sync system configs"
git push || echo "Push failed (remote ahead?) — committed locally, will push next time."