update
This commit is contained in:
1 parent
ed4fa767b0
commit
250280a2c7
6 files changed
+28
-5
No files matched your search
Executable
+17
@@ -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;
|
||||
"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /4server
|
||||
# Check that a search string was provided
|
||||
if [ -z "$1" ]; then
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') Usage: $0 <search_string>"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Example: ./start_by_uuid.sh abc-001-xxxx-xxxx-xxxx
|
||||
exec > /4server/data/log/startContainer.log 2>&1
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') Start container $1"
|
||||
|
||||
cd/4server
|
||||
source /4server/sbin/helpers
|
||||
|
||||
BIN_PATH="/4server/sbin"
|
||||
|
||||
Reference in new issue
Block a user