Reliably detecting that Flame database initialization has already been done

I’m scripting a Flame (project server) deployment, but I want to make 1000% sure that the database hasn’t already been initialized and contains valid data before my scripts run:

./igniter --init --auth=trust

Has anyone found a fool proof way to check for this?

JF

2 Likes

Grok wrote this for me which I use. I don’t attest to the quality, but it has been working.

CHECKSWDB=$(sudo -u flame_db -i "/opt/Autodesk/bin/igniter" --status 2>&1)

# Check if the output matches the expected string
if [[ "$CHECKSWDB" == $'\nPGDATA not set or invalid.' ]]; then
echo "No SWDB found, running initialization..."
sudo -u flame_db -i "/opt/Autodesk/bin/igniter" --init --auth=trust
else

echo "SWDB found."

fi
1 Like

@panisset - it’s mind boggling that there is anything that JFP does not know - this has to be an AI agent…

These days I do a lot more storage / networking / virtualization / security / … than actual Flame stuff unfortunately. But I do like the direction 2026 is going in, the infrastructure is so much cleaner / simpler, can’t wait to see some of the remaining 1990s legacy go away.

And thanks Alan for “igniter –status”, that looks like exactly what I need.

1 Like

Also it looks like if you try to run igniter –init on a machine where the database is already configured, you helpfully get:

$sudo ./igniter --init
initdb: error: directory "/var/opt/Autodesk/pgsql/17/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/opt/Autodesk/pgsql/17/data" or run initdb with an argument other than "/var/opt/Autodesk/pgsq
l/17/data".

Failed initialising DBMS.

1 Like