anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 44578e16a441b7cc03612b28ec8ef860a73eac1b
parent 48d180797a8d84e31343f8d56186cbf96b28ed94
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 19 Jan 2025 01:03:51 +0100

fix misc bugs with anastasis-dbconfig

Diffstat:
Mcontrib/anastasis-dbconfig | 4++--
Mdebian/etc/anastasis/anastasis.conf | 8+++-----
Msrc/stasis/anastasis-dbinit.c | 25++++++++++++-------------
3 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/contrib/anastasis-dbconfig b/contrib/anastasis-dbconfig @@ -22,7 +22,7 @@ set -eu RESET_DB=0 SKIP_DBINIT=0 DBUSER="anastasis-httpd" -CFGFILE="/etc/anastasis/secrets/anastasis-db.secret.conf" +CFGFILE="/etc/anastasis/anastasis.conf" # Parse command-line options while getopts 'c:hrsu:' OPTION; do @@ -126,7 +126,7 @@ else DO_CREATE=1 fi -if [1 = "$DO_CREATE" ] +if [ 1 = "$DO_CREATE" ] then echo "Creating database $DBNAME." 1>&2 diff --git a/debian/etc/anastasis/anastasis.conf b/debian/etc/anastasis/anastasis.conf @@ -1,4 +1,7 @@ [anastasis] +# Currency accepted by GNU Anastasis via GNU Taler payments. +CURRENCY = KUDOS + DATABASE = postgres SERVE = unix @@ -30,11 +33,6 @@ SERVE = unix PAYMENT_BACKEND_URL = http://backend.demo.taler.net/instances/Tutorial/ - -[taler] -# Currency accepted by GNU Anastasis via GNU Taler payments. -CURRENCY = KUDOS - [paths] ANASTASIS_HOME = /var/lib/anastasis diff --git a/src/stasis/anastasis-dbinit.c b/src/stasis/anastasis-dbinit.c @@ -132,19 +132,18 @@ main (int argc, GNUNET_GETOPT_OPTION_END }; - - GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("anastasis-dbinit", - "INFO", - NULL)); - if (GNUNET_OK != - GNUNET_PROGRAM_run (ANASTASIS_project_data (), - argc, argv, - "anastasis-dbinit", - "Initialize anastasis database", - options, - &run, NULL)) - return 1; + enum GNUNET_GenericReturnValue ret; + + ret = GNUNET_PROGRAM_run (ANASTASIS_project_data (), + argc, argv, + "anastasis-dbinit", + "Initialize anastasis database", + options, + &run, NULL); + if (GNUNET_SYSERR == ret) + return EXIT_INVALIDARGUMENT; + if (GNUNET_NO == ret) + return EXIT_SUCCESS; return global_ret; }