This commit is contained in:
Bob Mottram 2018-02-23 14:05:20 +00:00
commit e9d02969f5
5 changed files with 14 additions and 2 deletions

Binary file not shown.

View File

@ -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

View File

@ -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'

View File

@ -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/*

View File

@ -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
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