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;
"
+1 -1
View File
@@ -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>"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -1,3 +1,3 @@
# Example: allow your host to connect to all DBs as any user with password
host all all 10.5.0.1/32 md5
host all all 10.5.0.1/16 md5
+2 -2
View File
@@ -35,8 +35,8 @@ prsync -h "/app/host_vars/hosts" -avz ./sbin/ /4server/sbin/
### POSTGRESS
rex mkdir -p /4server/data/postgres/etc
template templates/pg_hba.conf /4server/data/postgres/etc/pg_hba.conf
template templates/postgresql.conf /4server/data/postgres/etc/postgresql.conf
template templates/pg_hba.conf /4server/data/postgres/data/pg_hba.conf
template templates/postgresql.conf /4server/data/postgres/data/postgresql.conf
+6
View File
@@ -12,3 +12,9 @@ rex doas rc-service checkCalls restart
prsync -h "/app/host_vars/hosts" -avz ./host_vars/borg-backup/* /home/4server/.ssh
rex doas chown 4server:4server /home/4server/.ssh/borg*
rex doas chmod 600 /home/4server/.ssh/borg*
# link all save scripts to /usr/sbin
rex doas ln -s /4server/sbin/activeContainers /usr/bin/
rex doas ln -s /4server/sbin/startContainer /usr/bin/
rex doas ln -s /4server/sbin/restartContainers /usr/bin/