This commit is contained in:
oliver committed 2026-10-13 09:23:36 -03:00
1 parent ed4fa767b0
commit 250280a2c7
6 files changed
+28 -5

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# List containers whose contract has not expired yet, next to expire first.
# Output: UUID, email, expires (header + aligned columns).
DB_PATH="/4server/data/contracts.db"
if [ ! -f "$DB_PATH" ]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') ERROR: database not found at $DB_PATH" >&2
exit 1
fi
sqlite3 -header -column "$DB_PATH" "
SELECT UUID AS uuid, email, expires
FROM containers
WHERE expires > date('now')
ORDER BY expires ASC;
"