Use zeronet trackers file
This commit is contained in:
parent
ec958bbd66
commit
d048fa72db
|
@ -1859,7 +1859,7 @@ function install_zeronet {
|
||||||
echo 'User=zeronet' >> /etc/systemd/system/zeronet.service
|
echo 'User=zeronet' >> /etc/systemd/system/zeronet.service
|
||||||
echo 'Group=zeronet' >> /etc/systemd/system/zeronet.service
|
echo 'Group=zeronet' >> /etc/systemd/system/zeronet.service
|
||||||
echo 'WorkingDirectory=/opt/zeronet' >> /etc/systemd/system/zeronet.service
|
echo 'WorkingDirectory=/opt/zeronet' >> /etc/systemd/system/zeronet.service
|
||||||
echo "ExecStart=/usr/bin/python zeronet.py --ip_external ${DEFAULT_DOMAIN_NAME}.local --config_file /opt/zeronet/zeronet.conf" >> /etc/systemd/system/zeronet.service
|
echo "ExecStart=/usr/bin/python zeronet.py --ip_external ${DEFAULT_DOMAIN_NAME}.local --trackers_file /opt/zeronet/bootstrap" >> /etc/systemd/system/zeronet.service
|
||||||
echo '' >> /etc/systemd/system/zeronet.service
|
echo '' >> /etc/systemd/system/zeronet.service
|
||||||
echo 'TimeoutSec=300' >> /etc/systemd/system/zeronet.service
|
echo 'TimeoutSec=300' >> /etc/systemd/system/zeronet.service
|
||||||
echo '' >> /etc/systemd/system/zeronet.service
|
echo '' >> /etc/systemd/system/zeronet.service
|
||||||
|
|
|
@ -323,7 +323,7 @@ zeronetavahi
|
||||||
|
|
||||||
existing_zeronet=$(ps aux | grep zeronet | wc -l)
|
existing_zeronet=$(ps aux | grep zeronet | wc -l)
|
||||||
if [ $existing_zeronet -lt "2" ]; then
|
if [ $existing_zeronet -lt "2" ]; then
|
||||||
python zeronet.py --ip_external $(hostname).local --config_file $ZERONET_DIR/zeronet.conf &
|
python zeronet.py --ip_external $(hostname).local --trackers_file $ZERONET_DIR/bootstrap &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if which firefox > /dev/null; then
|
if which firefox > /dev/null; then
|
||||||
|
|
|
@ -49,7 +49,7 @@ BLOGS_FILE=$ZERONET_INSTALL/freedombone-blogs
|
||||||
FORUM_FILE=$ZERONET_INSTALL/freedombone-fora
|
FORUM_FILE=$ZERONET_INSTALL/freedombone-fora
|
||||||
TOX_USERS_FILE=$ZERONET_INSTALL/freedombone-tox-users
|
TOX_USERS_FILE=$ZERONET_INSTALL/freedombone-tox-users
|
||||||
ZERONET_INDEX=/home/$MY_USERNAME/mesh.html
|
ZERONET_INDEX=/home/$MY_USERNAME/mesh.html
|
||||||
ZERONET_CONFIG=$ZERONET_INSTALL/zeronet.conf
|
ZERONET_CONFIG=$ZERONET_INSTALL/bootstrap
|
||||||
|
|
||||||
function create_index {
|
function create_index {
|
||||||
if [ -f $ZERONET_INDEX ]; then
|
if [ -f $ZERONET_INDEX ]; then
|
||||||
|
@ -123,9 +123,6 @@ if [ -f $ZERONET_CONFIG.new ]; then
|
||||||
rm -f $ZERONET_CONFIG.new
|
rm -f $ZERONET_CONFIG.new
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '[global]' > $ZERONET_CONFIG.new
|
|
||||||
echo 'trackers =' >> $ZERONET_CONFIG.new
|
|
||||||
|
|
||||||
state=0
|
state=0
|
||||||
address=""
|
address=""
|
||||||
peer=""
|
peer=""
|
||||||
|
@ -136,7 +133,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||||
address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
|
address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
|
||||||
tracker_url="http://$peer:$TRACKER_PORT/announce"
|
tracker_url="http://$peer:$TRACKER_PORT/announce"
|
||||||
if ! grep -q "$tracker_url" $ZERONET_CONFIG.new; then
|
if ! grep -q "$tracker_url" $ZERONET_CONFIG.new; then
|
||||||
echo " $tracker_url" >> $ZERONET_CONFIG.new
|
echo "$tracker_url" >> $ZERONET_CONFIG.new
|
||||||
tracker_ctr=$((tracker_ctr + 1))
|
tracker_ctr=$((tracker_ctr + 1))
|
||||||
fi
|
fi
|
||||||
state=0
|
state=0
|
||||||
|
|
Loading…
Reference in New Issue