make ulogger-install idempotent

darwin
Anish Lakhwara 2023-04-28 09:10:29 +10:00
parent ad7d63eea7
commit b363fd3c9e
1 changed files with 1 additions and 1 deletions

View File

@ -259,10 +259,10 @@ in
cd "${cfg.dataDir}"
if [ ! -f installed ]; then
echo "Install file not found, installing ..."
cp -R ${cfg.package}/* ./
cp ${configFile}/config.php ./
echo "Install file not found, installing ..."
psql -U ulogger < ${cfg.package}/scripts/ulogger.pgsql
psql -d ulogger -c "INSERT INTO users (login, password, admin) VALUES ('$ULOGGER_ADMIN_USER', '$ULOGGER_ADMIN_PASSWORD', TRUE)"
touch installed