Fix the zeronet port hack

This commit is contained in:
Bob Mottram 2015-09-12 10:30:56 +01:00
parent c60dd95eed
commit e4fd04354c
2 changed files with 2 additions and 4 deletions

View File

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

View File

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