aboutsummaryrefslogtreecommitdiff
path: root/taler-merchant/root
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2023-11-29 10:35:20 -0500
committerSlack Coder <slackcoder@server.ky>2024-03-12 16:38:56 -0500
commitb9eaaf853abd4250a6bc424914dae5189bc23de6 (patch)
tree873ca2d04e4c7f5516876822dafd0f0b38b01f5b /taler-merchant/root
parentd978a115ef800c22e5cc1a30d075b26c896cabad (diff)
downloadslackbuilds-b9eaaf853abd4250a6bc424914dae5189bc23de6.tar.xz
Add GNU Taler
Add the following packages and dependencies to build them from their git source repositories. - taler-exchange - taler-merchant - libeufin
Diffstat (limited to 'taler-merchant/root')
-rw-r--r--taler-merchant/root/etc/httpd/sites-available/taler-merchant.conf.new22
-rwxr-xr-xtaler-merchant/root/etc/rc.d/rc.taler-merchant.new51
-rw-r--r--taler-merchant/root/etc/taler/conf.d/merchant.conf.new10
-rw-r--r--taler-merchant/root/etc/taler/secrets/merchant-db.secret.conf.new8
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.