From 2e41de3d91b247bbcbd5988f04840038b70ae7e3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jun 2017 17:11:10 +0100 Subject: [PATCH] Keep track of rss mobile onion domain --- src/freedombone-app-rss | 7 +++++-- src/freedombone-utils-onion | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index c9713763..bc62dada 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -259,7 +259,7 @@ function remove_rss { nginx_dissite $RSS_READER_DOMAIN_NAME function_check remove_onion_service - remove_onion_service rss_mobile ${RSS_MOBILE_READER_ONION_PORT} + remove_onion_service mobilerss ${RSS_MOBILE_READER_ONION_PORT} remove_onion_service rss ${RSS_READER_ONION_PORT} if [ -f /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME ]; then rm /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME @@ -272,6 +272,7 @@ function remove_rss { remove_completion_param install_rss sed -i '/RSS /d' $COMPLETION_FILE sed -i '/rss /d' $COMPLETION_FILE + sed -i '/rss_/d' $COMPLETION_FILE remove_backup_database_local ttrss } @@ -337,7 +338,9 @@ function install_rss_main { sleep 2 - RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service rss_mobile 80 ${RSS_MOBILE_READER_ONION_PORT}) + RSS_MOBILE_READER_ONION_HOSTNAME=$(add_onion_service mobilerss 80 ${RSS_MOBILE_READER_ONION_PORT}) + + set_completion_param "rss_mobile onion domain" "$RSS_MOBILE_READER_ONION_HOSTNAME" echo 'server {' > /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo " listen 127.0.0.1:$RSS_MOBILE_READER_ONION_PORT;" >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index 953fd439..3131d0a1 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -59,7 +59,7 @@ function wait_for_onion_service_base { while [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; do sleep 1 sleep_ctr=$((sleep_ctr + 1)) - if [ $sleep_ctr -gt 10 ]; then + if [ $sleep_ctr -gt 20 ]; then break fi done