g
This commit is contained in:
1 parent
ef641e9fe2
commit
e03bb926e8
8 files changed
+87
-52
No files matched your search
+10
-1
@@ -10,7 +10,7 @@ DB_PATH="/4server/data/contracts.db"
|
||||
|
||||
get_contract_info() {
|
||||
|
||||
echo "get_contract_info $UUID"
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') Loading contract info for $UUID from $DB_PATH"
|
||||
|
||||
# Single CTE: the table is scanned once and all projections come from it
|
||||
while IFS="=" read -r key value; do
|
||||
@@ -48,4 +48,13 @@ get_contract_info() {
|
||||
done < <(printf '%s' "$SECRET_LIST" | tr -d '\r\n' | tr '\\' '\n')
|
||||
fi
|
||||
export ODOO_DB_PASSWORD=$psql
|
||||
|
||||
if [ -z "$CONTAINERDBID" ]; then
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') WARNING: no contract found for $UUID in $DB_PATH"
|
||||
else
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') Loaded contract for $UUID: DBID=$CONTAINERDBID IMAGE=$IMAGE STATUS=$STATUS CREATED=$CREATED EXPIRES=$EXPIRES"
|
||||
fi
|
||||
if [ -z "$ODOO_DB_PASSWORD" ]; then
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S') WARNING: no psql secret found for $UUID, ODOO_DB_PASSWORD is empty"
|
||||
fi
|
||||
}
|
||||
Reference in new issue
Block a user