diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-09 15:42:50 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-09 15:42:50 +0200 |
commit | cf595fa8480e87e1522710cd8ea7db9174aa028b (patch) | |
tree | 41a4c73e3098400afcacebb92344ea40c9210f07 | |
parent | 5f17d63c4cc7721a752c48170a66cb076040e1e0 (diff) |
check first
-rwxr-xr-x | contrib/taler-auditor-dbconfig | 8 | ||||
-rw-r--r-- | debian/taler-auditor.postinst | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/contrib/taler-auditor-dbconfig b/contrib/taler-auditor-dbconfig index d46c41eff..245d6970d 100755 --- a/contrib/taler-auditor-dbconfig +++ b/contrib/taler-auditor-dbconfig @@ -85,7 +85,7 @@ if sudo -i -u postgres psql "$DBNAME" < /dev/null 2> /dev/null then if [ 1 = "$RESET_DB" ] then - echo "Deleting existing database $DBNAME." 1>&2 + echo "Deleting existing database '$DBNAME'." 1>&2 sudo -i -u postgres dropdb "$DBNAME" else echo "Database '$DBNAME' already exists, refusing to setup again." @@ -111,10 +111,10 @@ fi if [ -f "$CFGFILE" ] then - echo "Adding database configuration to $CFGFILE." 1>&2 + echo "Adding database configuration to '$CFGFILE'." 1>&2 echo -e "[auditordb-postgres]\nCONFIG=postgres:///$DBNAME\n" >> "$CFGFILE" else - echo "Configuration $CFGFILE does not yet exist, creating it." 1>&2 + echo "Configuration '$CFGFILE' does not yet exist, creating it." 1>&2 mkdir -p "$(dirname "$CFGFILE")" echo -e "[auditordb-postgres]\nCONFIG=postgres:///$DBNAME\n" >> "$CFGFILE" chown "$DBUSER":root "$CFGFILE" @@ -123,7 +123,7 @@ fi if [ 0 = "$SKIP_DBINIT" ] then - echo "Initializing database $DBNAME." 1>&2 + echo "Initializing database '$DBNAME'." 1>&2 sudo -u "$DBUSER" taler-auditor-dbinit fi diff --git a/debian/taler-auditor.postinst b/debian/taler-auditor.postinst index d65fd8c5d..847e4aac1 100644 --- a/debian/taler-auditor.postinst +++ b/debian/taler-auditor.postinst @@ -20,7 +20,8 @@ configure) adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${TALER_HOME} ${_USERNAME} fi - if ! dpkg-statoverride --list /etc/taler/secrets/auditor-db.secret.conf >/dev/null 2>&1; then + if ! dpkg-statoverride --list /etc/taler/secrets/auditor-db.secret.conf >/dev/null 2>&1 + then dpkg-statoverride --add --update \ ${_USERNAME} ${_GROUPNAME} 640 \ /etc/taler/secrets/auditor-db.secret.conf |