[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-merchant-demos] 01/05: factor out uwsgi arg
From: |
gnunet |
Subject: |
[taler-taler-merchant-demos] 01/05: factor out uwsgi arg |
Date: |
Tue, 20 Apr 2021 17:04:24 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository taler-merchant-demos.
commit a284905936dbbb7a5698f7b4a85d3af2cc45cc1f
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Apr 20 13:40:42 2021 +0200
factor out uwsgi arg
---
Makefile | 4 ++--
bin/taler-merchant-demos | 12 +++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 10a2a01..25a2a5c 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,7 @@ sass-setup:
@echo "This is the initial sass-installation/setup script."
@echo "This setup must run as root, on a machine that has NPM
installed!"
@echo "If your password is requested (for escalation), please enter it."
- sudo npm install -g sass
+ npm install -g sass
.PHONY: scss-setup
scss-setup: sass-setup
@@ -75,7 +75,7 @@ scss-setup: sass-setup
sass-build:
@echo "Warning: If Sass/Scss is not installed, please run \`make
sass-setup\` first!"
@echo "This script will only convert files inside /static"
- sass talermerchantdemos/static:talermerchantdemos/static
+ sass --update talermerchantdemos/static:talermerchantdemos/static
.PHONY: scss-build
scss-build: sass-build
diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos
index feb4e4d..b252bb6 100755
--- a/bin/taler-merchant-demos
+++ b/bin/taler-merchant-demos
@@ -33,6 +33,11 @@ LOGGER = logging.getLogger(__name__)
# No perfect match to our logging format, but good enough ...
UWSGI_LOGFMT = "%(ltime) %(proto) %(method) %(uri) %(proto) => %(status)"
+# Argument to tell uWSGI to load the python plugin.
+# This hack is required, because on systems where the plugin is statically
linked,
+# loading it causes an error.
+arg_load_python = "--if-not-plugin python --plugins python --endif".split(" ")
+
##
# This function interprets the 'serve-uwsgi' subcommand.
# The effect is to launch the blog UWSGI service. This
@@ -45,6 +50,7 @@ def handle_serve_uwsgi(config, which_shop):
params = [
"uwsgi",
"uwsgi",
+ *arg_load_python,
"--master",
"--die-on-term",
"--log-format",
@@ -91,11 +97,7 @@ def handle_serve_http(config, which_shop, port=None):
os.execlp(
"uwsgi",
"uwsgi",
- "--if-not-plugin",
- "python",
- "--plugins",
- "python",
- "--endif",
+ *arg_load_python,
"--master",
"--die-on-term",
"--log-format",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.