diff --git a/man/freedombone-config.1.gz b/man/freedombone-config.1.gz index 551a7180..2d6679e1 100644 Binary files a/man/freedombone-config.1.gz and b/man/freedombone-config.1.gz differ diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 4e31eb75..6e6ab350 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -145,6 +145,7 @@ function upgrade_rss { chown -R www-data:www-data $RSS_MOBILE_READER_PATH chown -R www-data:www-data $RSS_READER_PATH chmod a+x $RSS_MOBILE_READER_PATH + systemctl restart ttrss } function backup_local_rss { @@ -388,10 +389,12 @@ function install_rss_main { rss_create_database + USE_V2_ONION_ADDRESS=1 RSS_READER_ONION_HOSTNAME=$(add_onion_service rss 80 ${RSS_READER_ONION_PORT}) sleep 2 + USE_V2_ONION_ADDRESS=1 RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service mobilerss 80 ${RSS_MOBILE_READER_ONION_PORT}) echo 'server {' > /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME diff --git a/src/freedombone-config b/src/freedombone-config index 06bd15d3..93a4b8d1 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -143,7 +143,6 @@ function show_help { echo $' -f --filename Configuration file (usually freedombone.cfg)' echo $' -m --min Minimum password length (characters)' echo $' -w --www Freedombone web site' - echo $' -b --bm Freedombone support Bitmessage address' echo $' -o --onion [yes|no] Whether to only create .onion sites' echo $' --minimal [yes|no] For minimalistic "consumer grade" installs' echo $' --social [gnusocial|postactiv] Create gnusocial/postactiv instance' diff --git a/src/freedombone-logging b/src/freedombone-logging index 6d4b6970..c8f24598 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -199,6 +199,7 @@ 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 + rm /var/log/tor/* fi if [ -d /var/log/radicale ]; then $REMOVE_FILES_COMMAND /var/log/radicale/* diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index f2178b96..b511f59a 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -31,6 +31,7 @@ # The maximum amount of traffic per day in gigabytes TOR_MAX_TRAFFIC_PER_MONTH_GB=10 +USE_V2_ONION_ADDRESS= HIDDEN_SERVICE_PATH='/var/lib/tor/hidden_service_' function add_email_hostname { @@ -115,22 +116,30 @@ function add_onion_service { if [ -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; then echo $(cat ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname) + USE_V2_ONION_ADDRESS= return fi if [ ! -d /var/lib/tor ]; then echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured." + USE_V2_ONION_ADDRESS= exit 877367 fi if ! grep -q "hidden_service_${onion_service_name}" /etc/tor/torrc; then echo "HiddenServiceDir ${HIDDEN_SERVICE_PATH}${onion_service_name}/" >> /etc/tor/torrc - echo 'HiddenServiceVersion 3' >> /etc/tor/torrc + if [ ! $USE_V2_ONION_ADDRESS ]; then + echo 'HiddenServiceVersion 3' >> /etc/tor/torrc + else + echo 'HiddenServiceVersion 2' >> /etc/tor/torrc + fi echo "HiddenServicePort ${onion_service_port_from} 127.0.0.1:${onion_service_port_to}" >> /etc/tor/torrc if [ ${#onion_stealth_name} -gt 0 ]; then echo "HiddenServiceAuthorizeClient stealth ${onion_stealth_name}" >> /etc/tor/torrc fi fi + USE_V2_ONION_ADDRESS= + onion_update function_check wait_for_onion_service