make ulogger-install idempotent
This commit is contained in:
parent
ad7d63eea7
commit
b363fd3c9e
|
@ -259,10 +259,10 @@ in
|
||||||
cd "${cfg.dataDir}"
|
cd "${cfg.dataDir}"
|
||||||
|
|
||||||
if [ ! -f installed ]; then
|
if [ ! -f installed ]; then
|
||||||
|
echo "Install file not found, installing ..."
|
||||||
cp -R ${cfg.package}/* ./
|
cp -R ${cfg.package}/* ./
|
||||||
cp ${configFile}/config.php ./
|
cp ${configFile}/config.php ./
|
||||||
|
|
||||||
echo "Install file not found, installing ..."
|
|
||||||
psql -U ulogger < ${cfg.package}/scripts/ulogger.pgsql
|
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)"
|
psql -d ulogger -c "INSERT INTO users (login, password, admin) VALUES ('$ULOGGER_ADMIN_USER', '$ULOGGER_ADMIN_PASSWORD', TRUE)"
|
||||||
touch installed
|
touch installed
|
||||||
|
|
Loading…
Reference in a new issue