Ensure that zeronet file port is open

This commit is contained in:
Bob Mottram 2015-09-04 11:06:51 +01:00
parent 030127e618
commit 50abe42d21
2 changed files with 11 additions and 1 deletions

View File

@ -1775,6 +1775,11 @@ function install_zeronet {
sudo chown -R zeronet:zeronet /opt/zeronet
cd /opt/zeronet
git checkout bashrc/bootstrap-file
# 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
echo '[Unit]' > /etc/systemd/system/zeronet.service
echo 'Description=Zeronet Server' >> /etc/systemd/system/zeronet.service

View File

@ -10,7 +10,7 @@ PEERS_FILE=/tmp/meshwebstart
ZERONET_REPO='https://github.com/bashrc/ZeroNet'
ZERONET_BLOG_REPO='https://github.com/HelloZeroNet/ZeroBlog'
ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroBoard'
ZERONET_FORUM_REPO='https://github.com/HelloZeroNet/ZeroTalk'
ZERONET_URL=http://127.0.0.1:43110
ZERONET_PORT=15441
TRACKER_PORT=6969
@ -242,6 +242,11 @@ function install_zeronet {
fi
cd $ZERONET_DIR
git checkout bashrc/bootstrap-file
# 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
}
if [ -f /var/lib/batman ]; then