aboutsummaryrefslogtreecommitdiff
path: root/stackbin.bin
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2022-02-15 10:19:09 -0500
committerB Stack <bgstack15@gmail.com>2022-02-15 10:22:01 -0500
commit1a0fbf8853496ac8725e58a1e905fb0fffc5093e (patch)
tree805bbfde5d58859ff37b03c76fc8280e59040b02 /stackbin.bin
parentupdate doc (diff)
downloadstackbin-1a0fbf8853496ac8725e58a1e905fb0fffc5093e.tar.gz
stackbin-1a0fbf8853496ac8725e58a1e905fb0fffc5093e.tar.bz2
stackbin-1a0fbf8853496ac8725e58a1e905fb0fffc5093e.zip
fix wsgi pidfile, user homedir, and INI loading
Diffstat (limited to 'stackbin.bin')
-rwxr-xr-xstackbin.bin7
1 files changed, 5 insertions, 2 deletions
diff --git a/stackbin.bin b/stackbin.bin
index 4fb3241..e98039f 100755
--- a/stackbin.bin
+++ b/stackbin.bin
@@ -1,8 +1,11 @@
#!/bin/sh
# Reference: fuss.bin from fuss project
# Startdate: 2022-02-13 19:25
-thisscript="$( readlink -f "${0}" )"
+test -z "${STACKBIN_WSGI_INI}" && {
+ thisscript="$( readlink -f "${0}" )"
+ STACKBIN_WSGI_INI="$( dirname "${thisscript}" )/$( basename "${thisscript}" | sed -r -e 's/\.bin$//;' ).wsgi.ini"
+}
COMMAND=""
grep -qiE 'ID=.*(rhel|centos|fedora)' /etc/os-release && COMMAND="${COMMAND} uwsgi" || \
COMMAND="${COMMAND} uwsgi_python39"
-${COMMAND} --ini "$( dirname "${thisscript}" )/$( basename "${thisscript}" | sed -r -e 's/\.bin$//;' ).wsgi.ini"
+${COMMAND} --ini "${STACKBIN_WSGI_INI}"
bgstack15