From e4fd04354cc4b10df472251365691611e141d574 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 12 Sep 2015 10:30:56 +0100 Subject: [PATCH] Fix the zeronet port hack --- src/freedombone | 3 +-- src/freedombone-meshweb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/freedombone b/src/freedombone index f7d4923f..fa8c3e11 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1848,8 +1848,7 @@ function install_zeronet { # Hack to ensure that the file access port is opened # This is because zeronet normally relies on an internet site # to do this, but on a purely local mesh the internet isn't available - sed -i 's|fileserver_port = 0|fileserver_port = config.fileserver_port - sys.modules["main"].file_server.port_opened = True|g' /opt/zeronet/src/Site/Site.py + sed -i 's|fileserver_port = 0|fileserver_port = config.fileserver_port\n sys.modules["main"].file_server.port_opened = True|g' /opt/zeronet/src/Site/Site.py echo '[Unit]' > /etc/systemd/system/zeronet.service echo 'Description=Zeronet Server' >> /etc/systemd/system/zeronet.service diff --git a/src/freedombone-meshweb b/src/freedombone-meshweb index 38864c21..b81e721c 100755 --- a/src/freedombone-meshweb +++ b/src/freedombone-meshweb @@ -250,8 +250,7 @@ function install_zeronet { # Hack to ensure that the file access port is opened # This is because zeronet normally relies on an internet site # to do this, but on a purely local mesh the internet isn't available - sed -i 's|fileserver_port = 0|fileserver_port = config.fileserver_port - sys.modules["main"].file_server.port_opened = True|g' $ZERONET_DIR/src/Site/Site.py + sed -i 's|fileserver_port = 0|fileserver_port = config.fileserver_port\n sys.modules["main"].file_server.port_opened = True|g' $ZERONET_DIR/src/Site/Site.py } if [ -f /var/lib/batman ]; then