diff --git a/src/freedombone b/src/freedombone index 17d99929..2f606c70 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1650,11 +1650,36 @@ function install_zeronet { echo '[Install]' >> /etc/systemd/system/zeronet.service echo 'WantedBy=multi-user.target' >> /etc/systemd/system/zeronet.service + echo '[Unit]' > /etc/systemd/system/tracker.service + echo 'Description=Torrent Tracker' >> /etc/systemd/system/tracker.service + echo 'After=syslog.target' >> /etc/systemd/system/tracker.service + echo 'After=network.target' >> /etc/systemd/system/tracker.service + echo '[Service]' >> /etc/systemd/system/tracker.service + echo 'Type=simple' >> /etc/systemd/system/tracker.service + echo 'User=tracker' >> /etc/systemd/system/tracker.service + echo 'Group=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 '' >> /etc/systemd/system/tracker.service + echo 'TimeoutSec=300' >> /etc/systemd/system/tracker.service + echo '' >> /etc/systemd/system/tracker.service + echo '[Install]' >> /etc/systemd/system/tracker.service + echo 'WantedBy=multi-user.target' >> /etc/systemd/system/tracker.service + + useradd -d /opt/tracker/ -s /bin/false tracker + if [ ! -d /opt/tracker ]; then + mkdir /opt/tracker + fi + chown -R tracker:tracker /opt/tracker + # publish regularly if ! grep -Fxq "zeronetavahi" /etc/crontab; then echo "* * * * * root zeronetavahi > /dev/null" >> /etc/crontab fi + systemctl enable tracker.service + systemctl start tracker.service + systemctl enable zeronet.service systemctl start zeronet.service