diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index 425ad588..b439cc7d 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -580,6 +580,8 @@ function install_gnusocial_main { function_check add_ddns_domain add_ddns_domain $GNUSOCIAL_DOMAIN_NAME + GNUSOCIAL_ONION_HOSTNAME=$(add_onion_service gnusocial 80 ${GNUSOCIAL_ONION_PORT}) + gnusocial_nginx_site=/etc/nginx/sites-available/$GNUSOCIAL_DOMAIN_NAME if [[ $ONION_ONLY == "no" ]]; then function_check nginx_http_redirect @@ -641,7 +643,7 @@ function install_gnusocial_main { fi echo 'server {' >> $gnusocial_nginx_site echo " listen 127.0.0.1:$GNUSOCIAL_ONION_PORT default_server;" >> $gnusocial_nginx_site - echo " server_name $GNUSOCIAL_DOMAIN_NAME;" >> $gnusocial_nginx_site + echo " server_name $GNUSOCIAL_ONION_HOSTNAME;" >> $gnusocial_nginx_site echo '' >> $gnusocial_nginx_site function_check nginx_compress nginx_compress $GNUSOCIAL_DOMAIN_NAME @@ -710,8 +712,6 @@ function install_gnusocial_main { gnusocial_ssl='never' fi - GNUSOCIAL_ONION_HOSTNAME=$(add_onion_service gnusocial 80 ${GNUSOCIAL_ONION_PORT}) - GNUSOCIAL_SERVER=${GNUSOCIAL_DOMAIN_NAME} if [[ $ONION_ONLY != 'no' ]]; then GNUSOCIAL_SERVER=${GNUSOCIAL_ONION_HOSTNAME} diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv index e36f76ee..9fb3e8af 100755 --- a/src/freedombone-app-postactiv +++ b/src/freedombone-app-postactiv @@ -591,6 +591,8 @@ function install_postactiv_main { function_check add_ddns_domain add_ddns_domain $POSTACTIV_DOMAIN_NAME + POSTACTIV_ONION_HOSTNAME=$(add_onion_service postactiv 80 ${POSTACTIV_ONION_PORT}) + postactiv_nginx_site=/etc/nginx/sites-available/$POSTACTIV_DOMAIN_NAME if [[ $ONION_ONLY == "no" ]]; then function_check nginx_http_redirect @@ -652,7 +654,7 @@ function install_postactiv_main { fi echo 'server {' >> $postactiv_nginx_site echo " listen 127.0.0.1:$POSTACTIV_ONION_PORT default_server;" >> $postactiv_nginx_site - echo " server_name $POSTACTIV_DOMAIN_NAME;" >> $postactiv_nginx_site + echo " server_name $POSTACTIV_ONION_HOSTNAME;" >> $postactiv_nginx_site echo '' >> $postactiv_nginx_site function_check nginx_disable_sniffing nginx_disable_sniffing $POSTACTIV_DOMAIN_NAME @@ -721,8 +723,6 @@ function install_postactiv_main { postactiv_ssl='never' fi - POSTACTIV_ONION_HOSTNAME=$(add_onion_service postactiv 80 ${POSTACTIV_ONION_PORT}) - POSTACTIV_SERVER=${POSTACTIV_DOMAIN_NAME} if [[ $ONION_ONLY != 'no' ]]; then POSTACTIV_SERVER=${POSTACTIV_ONION_HOSTNAME} diff --git a/src/freedombone-logging b/src/freedombone-logging index 23e59581..5e502a9b 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -94,9 +94,13 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then sed -i 's|logtarget.*|logtarget = /var/log/fail2ban.log|g' /etc/fail2ban/fail2ban.conf fi if [ -d /etc/tor ]; then + if [ ! -d /var/log/tor ]; then + mkdir /var/log/tor + chown -R debian-tor:adm /var/log/tor + fi if [ ! -f /var/log/tor/notices.log ]; then touch /var/log/tor/notices.log - chown debian-tor:debian-tor /var/log/tor/notices.log + chown debian-tor:adm /var/log/tor/notices.log fi sed -i 's|#Log notice file.*|Log notice file /var/log/tor/notices.log|g' /etc/tor/torrc sed -i 's|Log notice file.*|Log notice file /var/log/tor/notices.log|g' /etc/tor/torrc @@ -169,10 +173,6 @@ else if [ -d /etc/tor ]; then sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc - if [ -d /var/log/tor ]; then - $REMOVE_FILES_COMMAND /var/log/tor/* - rm -rf /var/log/tor - fi fi if [ -f /etc/mumble-server.ini ]; then sed -i 's|logfile=.*|logfile=/dev/null|g' /etc/mumble-server.ini