Fix the zeronet port hack
This commit is contained in:
parent
c60dd95eed
commit
e4fd04354c
|
@ -1848,8 +1848,7 @@ function install_zeronet {
|
||||||
# Hack to ensure that the file access port is opened
|
# Hack to ensure that the file access port is opened
|
||||||
# This is because zeronet normally relies on an internet site
|
# This is because zeronet normally relies on an internet site
|
||||||
# to do this, but on a purely local mesh the internet isn't available
|
# 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
|
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
|
||||||
sys.modules["main"].file_server.port_opened = True|g' /opt/zeronet/src/Site/Site.py
|
|
||||||
|
|
||||||
echo '[Unit]' > /etc/systemd/system/zeronet.service
|
echo '[Unit]' > /etc/systemd/system/zeronet.service
|
||||||
echo 'Description=Zeronet Server' >> /etc/systemd/system/zeronet.service
|
echo 'Description=Zeronet Server' >> /etc/systemd/system/zeronet.service
|
||||||
|
|
|
@ -250,8 +250,7 @@ function install_zeronet {
|
||||||
# Hack to ensure that the file access port is opened
|
# Hack to ensure that the file access port is opened
|
||||||
# This is because zeronet normally relies on an internet site
|
# This is because zeronet normally relies on an internet site
|
||||||
# to do this, but on a purely local mesh the internet isn't available
|
# 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
|
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
|
||||||
sys.modules["main"].file_server.port_opened = True|g' $ZERONET_DIR/src/Site/Site.py
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f /var/lib/batman ]; then
|
if [ -f /var/lib/batman ]; then
|
||||||
|
|
Loading…
Reference in New Issue