update ulogger so it dosen't recreate everytime

This commit is contained in:
Anish Lakhwara 2023-04-27 16:14:58 +10:00
parent ac312637e7
commit ad7d63eea7

View file

@ -258,10 +258,10 @@ in
echo "Setting up ulogger-server files in ${cfg.dataDir} ..."
cd "${cfg.dataDir}"
if [ ! -f installed ]; then
cp -R ${cfg.package}/* ./
cp ${configFile}/config.php ./
if [ ! -f installed ]; then
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)"