Launch tracker on client

This commit is contained in:
Bob Mottram 2015-08-29 23:11:17 +01:00
parent 3b78a97f1d
commit 41a4c937f9
2 changed files with 17 additions and 2 deletions

View File

@ -1659,7 +1659,7 @@ function install_zeronet {
echo 'User=tracker' >> /etc/systemd/system/tracker.service echo 'User=tracker' >> /etc/systemd/system/tracker.service
echo 'Group=tracker' >> /etc/systemd/system/tracker.service echo 'Group=tracker' >> /etc/systemd/system/tracker.service
echo 'WorkingDirectory=/opt/tracker' >> /etc/systemd/system/tracker.service echo 'WorkingDirectory=/opt/tracker' >> /etc/systemd/system/tracker.service
echo 'ExecStart=bttrack --port 6969 --dfile /opt/tracker/dstate --logfile /opt/tracker/tracker.log --nat_check 0 --scrape_allowed full' >> /etc/systemd/system/tracker.service echo "ExecStart=bttrack --port $TRACKER_PORT --dfile /opt/tracker/dstate --logfile /opt/tracker/tracker.log --nat_check 0 --scrape_allowed full" >> /etc/systemd/system/tracker.service
echo '' >> /etc/systemd/system/tracker.service echo '' >> /etc/systemd/system/tracker.service
echo 'TimeoutSec=300' >> /etc/systemd/system/tracker.service echo 'TimeoutSec=300' >> /etc/systemd/system/tracker.service
echo '' >> /etc/systemd/system/tracker.service echo '' >> /etc/systemd/system/tracker.service

View File

@ -380,8 +380,23 @@ fi
if [[ $peer_index == 1 ]]; then if [[ $peer_index == 1 ]]; then
cd $ZERONET_DIR cd $ZERONET_DIR
if [ ! -d ~/.bttrack ]; then
mkdir ~/.bttrack
fi
existing_bttrack=$(ps aux | grep bttrack | wc -l)
if [ $existing_bttrack -lt "2" ]; then
bttrack --port $TRACKER_PORT --dfile ~/.bttrack/dstate --logfile ~/.bttrack/tracker.log --nat_check 0 --scrape_allowed full &
fi
zeronetavahi zeronetavahi
existing_zeronet=$(ps aux | grep zeronet | wc -l)
if [ $existing_zeronet -lt "2" ]; then
python zeronet.py & python zeronet.py &
fi
if which xdg-open > /dev/null; then if which xdg-open > /dev/null; then
xdg-open $ZERONET_URL xdg-open $ZERONET_URL
elif which gnome-open > /dev/null; then elif which gnome-open > /dev/null; then