aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-07-30 15:50:45 +0200
committerFlorian Dold <florian@dold.me>2021-07-30 15:50:59 +0200
commit6dc199554f0bb1692a86240ec8ae032d97ccf325 (patch)
tree3509dd40dfa508617d93d405ecf48b900c2581c5
parent2daaf1531092836c12b32c1c05261f598575fbb3 (diff)
downloadanastasis-6dc199554f0bb1692a86240ec8ae032d97ccf325.tar.gz
anastasis-6dc199554f0bb1692a86240ec8ae032d97ccf325.zip
debian: socket location
-rw-r--r--debian/anastasis-httpd.postrm47
-rw-r--r--debian/etc/nginx/sites-available/anastasis20
-rw-r--r--src/backend/anastasis.conf2
3 files changed, 16 insertions, 53 deletions
diff --git a/debian/anastasis-httpd.postrm b/debian/anastasis-httpd.postrm
index fc96f0e..3b707d2 100644
--- a/debian/anastasis-httpd.postrm
+++ b/debian/anastasis-httpd.postrm
@@ -2,31 +2,6 @@
2 2
3set -e 3set -e
4 4
5pathfind() {
6 OLDIFS="$IFS"
7 IFS=:
8 for p in $PATH; do
9 if [ -x "$p/$*" ]; then
10 IFS="$OLDIFS"
11 return 0
12 fi
13 done
14 IFS="$OLDIFS"
15 return 1
16}
17
18apache_remove() {
19 if [ diff /etc/anastasis/apache.conf /etc/apache2/conf-available/anastasis.conf ] >/dev/null 2>&1; then
20 rm -f /etc/apache2/conf-available/anastasis.conf
21 fi
22}
23
24nginx_remove() {
25 if [ diff /etc/taler-exchange/nginx.conf /etc/apache2/conf-available/taler-exchange.conf ] >/dev/null 2>&1; then
26 rm -f /etc/nginx/conf-available/anastasis.conf
27 fi
28}
29
30if [ -f /usr/share/debconf/confmodule ]; then 5if [ -f /usr/share/debconf/confmodule ]; then
31 . /usr/share/debconf/confmodule 6 . /usr/share/debconf/confmodule
32fi 7fi
@@ -36,31 +11,13 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then
36 dbc_go anastasis "$@" 11 dbc_go anastasis "$@"
37fi 12fi
38 13
39if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
40 if [ -f /usr/share/debconf/confmodule ]; then
41 . /usr/share/debconf/confmodule
42 db_version 2.0
43 db_get anastasis/reconfigure-webserver
44 webservers="$RET"
45 for webserver in $webservers; do
46 webserver=${webserver%,}
47 if [ "$webserver" = "nginx" ]; then
48 nginx_remove
49 else
50 apache_remove
51 fi
52 done
53 fi
54fi
55
56case "${1}" in 14case "${1}" in
57purge) 15purge)
58 rm -f /var/lib/anastasis/master-api-key.txt
59 rm -rf /var/lib/anastasis/httpd/ 16 rm -rf /var/lib/anastasis/httpd/
60 ;; 17 ;;
61remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;; 18remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)
19 ;;
62 20
63\
64 *) 21 *)
65 echo "postrm called with unknown argument \`${1}'" >&2 22 echo "postrm called with unknown argument \`${1}'" >&2
66 exit 1 23 exit 1
diff --git a/debian/etc/nginx/sites-available/anastasis b/debian/etc/nginx/sites-available/anastasis
index 6828f0b..4b39229 100644
--- a/debian/etc/nginx/sites-available/anastasis
+++ b/debian/etc/nginx/sites-available/anastasis
@@ -1,8 +1,14 @@
1location /anastasis/ { 1server {
2 proxy_pass http://unix:/var/lib/anastasis/httpd/anastasis.sock; 2 listen 80;
3 proxy_redirect off; 3 listen [::]:80;
4 proxy_set_header Host $host;
5 proxy_set_header X-Forwarded-Host "example.com";
6 proxy_set_header X-Forwarded-Proto "https";
7 4
8} \ No newline at end of file 5 # server_name example.com
6
7 location /anastasis/ {
8 proxy_pass http://unix:/run/anastasis/httpd/anastasis-http.sock;
9 proxy_redirect off;
10 proxy_set_header Host $host;
11 #proxy_set_header X-Forwarded-Host "example.com";
12 #proxy_set_header X-Forwarded-Proto "https";
13 }
14}
diff --git a/src/backend/anastasis.conf b/src/backend/anastasis.conf
index ddc1a65..23015ae 100644
--- a/src/backend/anastasis.conf
+++ b/src/backend/anastasis.conf
@@ -19,7 +19,7 @@ PORT = 9977
19 19
20 20
21# Which unix domain path should we bind to? Only used if "SERVE" is 'unix'. 21# Which unix domain path should we bind to? Only used if "SERVE" is 'unix'.
22UNIXPATH = ${ANASTASIS_RUNTIME_DIR}/backend.http 22UNIXPATH = ${ANASTASIS_RUNTIME_DIR}/httpd/anastasis-http.sock
23# What should be the file access permissions (see chmod) for "UNIXPATH"? 23# What should be the file access permissions (see chmod) for "UNIXPATH"?
24UNIXPATH_MODE = 660 24UNIXPATH_MODE = 660
25 25