merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 08fe9ada3316343df083dc78ec5b294a8d2c17ff
parent c94541d3ed3bddc22cdee22c1dd56056b83d0fdb
Author: Florian Dold <florian@dold.me>
Date:   Fri, 30 Jul 2021 13:25:12 +0200

debian: just install sample websites

Diffstat:
Rdebian/conf/apache.conf -> debian/etc/apache2/sites-available/taler-merchant.conf | 0
Rdebian/conf/nginx.conf -> debian/etc/nginx/sites-available/taler-merchant | 0
Mdebian/taler-merchant.postinst | 41+----------------------------------------
3 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/debian/conf/apache.conf b/debian/etc/apache2/sites-available/taler-merchant.conf diff --git a/debian/conf/nginx.conf b/debian/etc/nginx/sites-available/taler-merchant diff --git a/debian/taler-merchant.postinst b/debian/taler-merchant.postinst @@ -2,6 +2,7 @@ set -e +TALER_HOME="/var/lib/taler" _USERNAME=taler-merchant-httpd _GROUPNAME=www-data @@ -10,31 +11,10 @@ _GROUPNAME=www-data dbc_dbfile_owner="${_USERNAME}:${_GROUPNAME}" dbc_dbfile_perms="0600" -# 1st argument will be the SECURITYTOKEN to use. -apache_install() { - mkdir -p /etc/apache2/conf-available - if [ ! -f /etc/apache2/conf-available/taler-merchant.conf ]; then - cat /etc/taler-merchant/apache.conf | sed -e "s/%SECURITYTOKEN%/$1/" >/etc/apache2/conf-available/taler-merchant.conf - fi -} - -# 1st argument will be the SECURITYTOKEN to use. -nginx_install() { - mkdir -p /etc/nginx/conf-available - if [ ! -f /etc/nginx/conf-available/taler-merchant.conf ]; then - cat /etc/taler-merchant/nginx.conf | sed -e "s/%SECURITYTOKEN%/$1/" >/etc/nginx/conf-available/taler-merchant.conf - fi -} - . /usr/share/debconf/confmodule case "${1}" in configure) - db_version 2.0 - - # Read default values - CONFIG_FILE="/etc/default/taler-merchant" - TALER_HOME="/var/lib/taler" # Creating taler users if needed if ! getent passwd ${_USERNAME} >/dev/null; then @@ -48,25 +28,6 @@ configure) dbc_go taler-merchant "$@" fi - # Create access secret - SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1) - echo SECRET >${TALER_HOME}/master-api-key.txt - chown ${_USERNAME}:${_GROUPNAME} ${TALER_HOME}/master-api-key.txt - chmod 440 ${TALER_HOME}/master-api-key.txt - - # Configure Webserver - db_get taler-merchant/reconfigure-webserver - webservers="$RET" - for webserver in $webservers; do - webserver=${webserver%,} - if [ "$webserver" = "nginx" ]; then - nginx_install "$SECRET" - else - apache_install "$SECRET" - fi - done - db_stop - ;; abort-upgrade | abort-remove | abort-deconfigure) ;;