diff options
author | Florian Dold <florian@dold.me> | 2021-07-30 13:25:12 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-07-30 13:25:15 +0200 |
commit | 08fe9ada3316343df083dc78ec5b294a8d2c17ff (patch) | |
tree | d3c3117dae6cd4a820ced53729ef68b1d2a12552 | |
parent | c94541d3ed3bddc22cdee22c1dd56056b83d0fdb (diff) |
debian: just install sample websites
-rw-r--r-- | debian/etc/apache2/sites-available/taler-merchant.conf (renamed from debian/conf/apache.conf) | 0 | ||||
-rw-r--r-- | debian/etc/nginx/sites-available/taler-merchant (renamed from debian/conf/nginx.conf) | 0 | ||||
-rw-r--r-- | debian/taler-merchant.postinst | 41 |
3 files changed, 1 insertions, 40 deletions
diff --git a/debian/conf/apache.conf b/debian/etc/apache2/sites-available/taler-merchant.conf index eebc6826..eebc6826 100644 --- a/debian/conf/apache.conf +++ b/debian/etc/apache2/sites-available/taler-merchant.conf diff --git a/debian/conf/nginx.conf b/debian/etc/nginx/sites-available/taler-merchant index 82aaa306..82aaa306 100644 --- a/debian/conf/nginx.conf +++ b/debian/etc/nginx/sites-available/taler-merchant diff --git a/debian/taler-merchant.postinst b/debian/taler-merchant.postinst index fbc7128b..c7fd6ffc 100644 --- a/debian/taler-merchant.postinst +++ b/debian/taler-merchant.postinst @@ -2,6 +2,7 @@ set -e +TALER_HOME="/var/lib/taler" _USERNAME=taler-merchant-httpd _GROUPNAME=www-data @@ -10,31 +11,10 @@ _GROUPNAME=www-data dbc_dbfile_owner="${_USERNAME}:${_GROUPNAME}" dbc_dbfile_perms="0600" -# 1st argument will be the SECURITYTOKEN to use. -apache_install() { - mkdir -p /etc/apache2/conf-available - if [ ! -f /etc/apache2/conf-available/taler-merchant.conf ]; then - cat /etc/taler-merchant/apache.conf | sed -e "s/%SECURITYTOKEN%/$1/" >/etc/apache2/conf-available/taler-merchant.conf - fi -} - -# 1st argument will be the SECURITYTOKEN to use. -nginx_install() { - mkdir -p /etc/nginx/conf-available - if [ ! -f /etc/nginx/conf-available/taler-merchant.conf ]; then - cat /etc/taler-merchant/nginx.conf | sed -e "s/%SECURITYTOKEN%/$1/" >/etc/nginx/conf-available/taler-merchant.conf - fi -} - . /usr/share/debconf/confmodule case "${1}" in configure) - db_version 2.0 - - # Read default values - CONFIG_FILE="/etc/default/taler-merchant" - TALER_HOME="/var/lib/taler" # Creating taler users if needed if ! getent passwd ${_USERNAME} >/dev/null; then @@ -48,25 +28,6 @@ configure) dbc_go taler-merchant "$@" fi - # Create access secret - SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1) - echo SECRET >${TALER_HOME}/master-api-key.txt - chown ${_USERNAME}:${_GROUPNAME} ${TALER_HOME}/master-api-key.txt - chmod 440 ${TALER_HOME}/master-api-key.txt - - # Configure Webserver - db_get taler-merchant/reconfigure-webserver - webservers="$RET" - for webserver in $webservers; do - webserver=${webserver%,} - if [ "$webserver" = "nginx" ]; then - nginx_install "$SECRET" - else - apache_install "$SECRET" - fi - done - db_stop - ;; abort-upgrade | abort-remove | abort-deconfigure) ;; |