diff --git a/roles/torrent/files/do-torrent-stats.sh b/roles/torrent/files/do-torrent-stats.sh index 1e919e75e7..bf26ccd81a 100644 --- a/roles/torrent/files/do-torrent-stats.sh +++ b/roles/torrent/files/do-torrent-stats.sh @@ -2,7 +2,7 @@ statscmd=/usr/local/bin/torrent-data.py btdata=/srv/torrent/data/bttrack.dat -outputdir=/srv/torrent/www/stats/ +outputdir=/srv/web/stats/ hourlydir=$outputdir/hourly dailydir=$outputdir/daily latestlink=$outputdir/current-stats.json diff --git a/roles/torrent/files/opentracker-ipv4.conf b/roles/torrent/files/opentracker-ipv4.conf index 4fce278be9..b8419861d8 100644 --- a/roles/torrent/files/opentracker-ipv4.conf +++ b/roles/torrent/files/opentracker-ipv4.conf @@ -7,6 +7,7 @@ # If no listen option is given (here or on the command line), opentracker # listens on 0.0.0.0:6969 tcp and udp. # +listen.tcp_udp 152.19.134.141 # listen.tcp_udp 0.0.0.0 # listen.tcp_udp 192.168.0.1:80 # listen.tcp_udp 10.0.0.5:6969 @@ -42,7 +43,7 @@ access.whitelist ./whitelist # access.stats 98.122.179.19 access.stats 127.0.0.1 -access.stats 152.19.134.148 +access.stats 152.19.134.141 # # There is another way of hiding your stats. You can obfuscate the path # to them. Normally it is located at /stats but you can configure it to diff --git a/roles/torrent/files/pull_opentracker_data.sh b/roles/torrent/files/pull_opentracker_data.sh index 924a858fd1..6362ee193e 100755 --- a/roles/torrent/files/pull_opentracker_data.sh +++ b/roles/torrent/files/pull_opentracker_data.sh @@ -2,7 +2,7 @@ # fetch data files from the opentracker stats output # store them away for later analysis # skvidal -base=/srv/torrent/www/stats/raw +base=/srv/web/stats/raw baseurl='http://torrent.fedoraproject.org:6969/stats?mode=' date=`date +%Y-%m-%d` hour=`date +%H` @@ -29,10 +29,10 @@ ln -sf $dest/$hour.xml $base/everything/current.xml # generate the json files hourdate=`date +%Y-%m-%d-%H-%M` -/usr/local/bin/torrentjsonstats.py $base/torrent/current.txt > /srv/torrent/www/stats/hourly/torrent-stats-$hourdate.json -ln -sf /srv/torrent/www/stats/hourly/torrent-stats-$hourdate.json /srv/torrent/www/stats/current-stats.json +/usr/local/bin/torrentjsonstats.py $base/torrent/current.txt > /srv/web/stats/hourly/torrent-stats-$hourdate.json +ln -sf /srv/torrent/www/stats/hourly/torrent-stats-$hourdate.json /srv/web/stats/current-stats.json if [ $hour == '12' ]; then - /usr/local/bin/torrentjsonstats.py $base/torrent/current.txt > /srv/torrent/www/stats/daily/torrent-stats-$date.json + /usr/local/bin/torrentjsonstats.py $base/torrent/current.txt > /srv/web/stats/daily/torrent-stats-$date.json fi diff --git a/roles/torrent/files/torrent-httpd.conf b/roles/torrent/files/torrent-httpd.conf index d8b6a1aa8b..5efc6c4772 100644 --- a/roles/torrent/files/torrent-httpd.conf +++ b/roles/torrent/files/torrent-httpd.conf @@ -1,4 +1,4 @@ - + Options Indexes FollowSymLinks Require all granted diff --git a/roles/torrent/tasks/main.yml b/roles/torrent/tasks/main.yml index 22e369aad5..edde866a75 100644 --- a/roles/torrent/tasks/main.yml +++ b/roles/torrent/tasks/main.yml @@ -25,11 +25,11 @@ file: path={{ item.file }} owner={{ item.owner }} group={{ item.group }} mode={{ item.mode }} state=directory with_items: - - { file: /srv/torrent/www/stats/daily/, owner: opentracker, group: torrent, mode: 2775} - - { file: /srv/torrent/www/stats/hourly/, owner: opentracker, group: torrent, mode: 2775} - - { file: /srv/torrent/www/stats/raw/, owner: opentracker, group: torrentadmin, mode: 2775} - - { file: /srv/torrent/www/stats/raw/evertyhing/, owner: opentracker, group: torrentadmin, mode: 2775} - - { file: /srv/torrent/www/stats/raw/torrent/, owner: opentracker, group: torrentadmin, mode: 2775} + - { file: /srv/web/stats/daily/, owner: opentracker, group: torrent, mode: 2775} + - { file: /srv/web/stats/hourly/, owner: opentracker, group: torrent, mode: 2775} + - { file: /srv/web/stats/raw/, owner: opentracker, group: torrentadmin, mode: 2775} + - { file: /srv/web/stats/raw/evertyhing/, owner: opentracker, group: torrentadmin, mode: 2775} + - { file: /srv/web/stats/raw/torrent/, owner: opentracker, group: torrentadmin, mode: 2775} tags: - config