anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 6dc199554f0bb1692a86240ec8ae032d97ccf325
parent 2daaf1531092836c12b32c1c05261f598575fbb3
Author: Florian Dold <florian@dold.me>
Date:   Fri, 30 Jul 2021 15:50:45 +0200

debian: socket location

Diffstat:
Mdebian/anastasis-httpd.postrm | 47++---------------------------------------------
Mdebian/etc/nginx/sites-available/anastasis | 21+++++++++++++--------
Msrc/backend/anastasis.conf | 2+-
3 files changed, 16 insertions(+), 54 deletions(-)

diff --git a/debian/anastasis-httpd.postrm b/debian/anastasis-httpd.postrm @@ -2,31 +2,6 @@ set -e -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - -apache_remove() { - if [ diff /etc/anastasis/apache.conf /etc/apache2/conf-available/anastasis.conf ] >/dev/null 2>&1; then - rm -f /etc/apache2/conf-available/anastasis.conf - fi -} - -nginx_remove() { - if [ diff /etc/taler-exchange/nginx.conf /etc/apache2/conf-available/taler-exchange.conf ] >/dev/null 2>&1; then - rm -f /etc/nginx/conf-available/anastasis.conf - fi -} - if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi @@ -36,31 +11,13 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then dbc_go anastasis "$@" fi -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_version 2.0 - db_get anastasis/reconfigure-webserver - webservers="$RET" - for webserver in $webservers; do - webserver=${webserver%,} - if [ "$webserver" = "nginx" ]; then - nginx_remove - else - apache_remove - fi - done - fi -fi - case "${1}" in purge) - rm -f /var/lib/anastasis/master-api-key.txt rm -rf /var/lib/anastasis/httpd/ ;; -remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) + ;; -\ *) echo "postrm called with unknown argument \`${1}'" >&2 exit 1 diff --git a/debian/etc/nginx/sites-available/anastasis b/debian/etc/nginx/sites-available/anastasis @@ -1,8 +1,14 @@ -location /anastasis/ { - proxy_pass http://unix:/var/lib/anastasis/httpd/anastasis.sock; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host "example.com"; - proxy_set_header X-Forwarded-Proto "https"; +server { + listen 80; + listen [::]:80; -} -\ No newline at end of file + # server_name example.com + + location /anastasis/ { + proxy_pass http://unix:/run/anastasis/httpd/anastasis-http.sock; + proxy_redirect off; + proxy_set_header Host $host; + #proxy_set_header X-Forwarded-Host "example.com"; + #proxy_set_header X-Forwarded-Proto "https"; + } +} diff --git a/src/backend/anastasis.conf b/src/backend/anastasis.conf @@ -19,7 +19,7 @@ PORT = 9977 # Which unix domain path should we bind to? Only used if "SERVE" is 'unix'. -UNIXPATH = ${ANASTASIS_RUNTIME_DIR}/backend.http +UNIXPATH = ${ANASTASIS_RUNTIME_DIR}/httpd/anastasis-http.sock # What should be the file access permissions (see chmod) for "UNIXPATH"? UNIXPATH_MODE = 660