make ulogger-install idempotent

This commit is contained in:
Anish Lakhwara 2023-04-28 09:10:29 +10:00
parent ad7d63eea7
commit b363fd3c9e

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