daily backup 2026-09-14

This commit is contained in:
Adolfo Reyna
2026-09-14 22:40:15 -04:00
parent 30f9148adb
commit 4fe483f68f
12 changed files with 199 additions and 16 deletions
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.adolforeyna.kid-dash-dev</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/npm</string>
<string>run</string>
<string>dev</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/adolforeyna/brain/projects/kid_dash/webapp</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/bin:/bin</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/adolforeyna/Library/Logs/kid-dash-dev.log</string>
<key>StandardErrorPath</key>
<string>/Users/adolforeyna/Library/Logs/kid-dash-dev.error.log</string>
</dict>
</plist>
+8
View File
@@ -0,0 +1,8 @@
{
"match": [{"host": ["elias.reynafamily.com"]}],
"handle": [{
"handler": "reverse_proxy",
"upstreams": [{"dial": "192.168.68.130:5173"}]
}],
"terminal": true
}
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
set -eu
HOST="elias.reynafamily.com"
ROUTE_JSON="/home/adolforeyna/elias-caddy-route.json"
API="http://127.0.0.1:2019/config/apps/http/servers/srv2/routes"
INDEX=$(curl -fsS "$API" | python3 -c '
import json, sys
host = sys.argv[1]
routes = json.load(sys.stdin)
for index, route in enumerate(routes):
if any(host in match.get("host", []) for match in route.get("match", [])):
print(index)
break
' "$HOST")
if [ -n "$INDEX" ]; then
curl -fsS -X DELETE "$API/$INDEX"
fi
curl -fsS -X POST -H "Content-Type: application/json" --data-binary "@$ROUTE_JSON" "$API"