diff options
Diffstat (limited to 'taler-merchant/root/etc')
4 files changed, 91 insertions, 0 deletions
diff --git a/taler-merchant/root/etc/httpd/sites-available/taler-merchant.conf.new b/taler-merchant/root/etc/httpd/sites-available/taler-merchant.conf.new new file mode 100644 index 0000000..5d0050a --- /dev/null +++ b/taler-merchant/root/etc/httpd/sites-available/taler-merchant.conf.new @@ -0,0 +1,22 @@ +# Make sure to enable the following Apache modules before +# integrating this into your configuration: +# +# a2enmod proxy +# a2enmod proxy_http +# a2enmod headers +# +# NOTE: +# - consider to adjust the location +# - consider putting all this into a VirtualHost +# - strongly consider setting up TLS support +# +# For all of the above, please read the respective +# Apache documentation. +# +<Location "/"> + ProxyPass "unix:/var/run/taler/merchant-httpd/merchant-http.sock|http://example.com/" + + # NOTE: + # - Uncomment this line if you use TLS/HTTPS + RequestHeader add "X-Forwarded-Proto" "https" +</Location> diff --git a/taler-merchant/root/etc/rc.d/rc.taler-merchant.new b/taler-merchant/root/etc/rc.d/rc.taler-merchant.new new file mode 100755 index 0000000..cf6c783 --- /dev/null +++ b/taler-merchant/root/etc/rc.d/rc.taler-merchant.new @@ -0,0 +1,51 @@ +#!/bin/sh +# +# Startup/shutdown script for GNU Taler's exchange. +# + +create_run_dir() { + if [ ! -d /run/taler/ ]; then + mkdir -p /run/taler + chown :taler /run/taler + chmod g+wX /run/taler + fi +} + +start() { + echo "Starting Taler Merchant" + create_run_dir + + daemon \ + --name=taler-merchant-httpd \ + --user=taler-merchant \ + --pidfiles=/run/taler \ + --output=/var/log/taler/taler-merchant-httpd.log \ + -- taler-merchant-httpd --config /etc/taler/taler.conf +} + +stop() { + echo "Stopping Taler Merchant" + /usr/bin/daemon --name=taler-merchant-httpd --pidfiles=/run/taler --stop +} + +status() { + /usr/bin/daemon --name=taler-merchant-httpd --pidfiles=/run/taler --running --verbose +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +status) + status + ;; +*) + echo "Usage: $0 {start|stop|status}" + exit 1 +esac + + + diff --git a/taler-merchant/root/etc/taler/conf.d/merchant.conf.new b/taler-merchant/root/etc/taler/conf.d/merchant.conf.new new file mode 100644 index 0000000..4851615 --- /dev/null +++ b/taler-merchant/root/etc/taler/conf.d/merchant.conf.new @@ -0,0 +1,10 @@ +# Read secret sections into configuration, but only +# if we have permission to do so. +@inline-secret@ merchantdb-postgres ../secrets/merchant-db.secret.conf + +[merchant] +DATABASE = postgres +SERVE = unix + +# Merchant-specific overrides, included last to take precedence. +@inline-matching@ ../merchant-overrides.conf diff --git a/taler-merchant/root/etc/taler/secrets/merchant-db.secret.conf.new b/taler-merchant/root/etc/taler/secrets/merchant-db.secret.conf.new new file mode 100644 index 0000000..6cbbb24 --- /dev/null +++ b/taler-merchant/root/etc/taler/secrets/merchant-db.secret.conf.new @@ -0,0 +1,8 @@ +[merchantdb-postgres] + +# Typically, there should only be a single line here, of the form: + +CONFIG=postgres:///taler-merchant + +# The details of the URI depend on where the database lives and how +# access control was configured. |