|
1 | 1 | # m h dom mon dow command
|
| 2 | +# |
| 3 | +# EVERY HOUR |
| 4 | +# Every hour destroy possible IP addresses from the error logs |
| 5 | +0 * * * * sed -i s/'\['client.*'\]'/'\['0.0.0.0'\]'/ /usr/local/lib/ahmia/error/error.log 2>&1 |
| 6 | +0 * * * * sed -i s/'\['client.*'\]'/'\['0.0.0.0'\]'/ /usr/local/lib/ahmia/error/hs_error.log 2>&1 |
| 7 | +# |
| 8 | +# EVERY DAY |
2 | 9 | # Check every day statistics from Tor2web nodes.
|
3 | 10 | 0 1 * * * timeout 1800s python /usr/local/lib/ahmia/tools/get_tor2web_domains.py >>/usr/local/lib/ahmia/error/tools_get.log 2>&1
|
4 | 11 | # Move Tor2web stats to the database
|
5 | 12 | 0 2 * * * timeout 9000s python /usr/local/lib/ahmia/tools/use_popularity_data.py >>/usr/local/lib/ahmia/error/tools_popularity.log 2>&1
|
6 | 13 | # Check every day which hidden services are online and try to download description.json from them.
|
7 | 14 | 0 3 * * * timeout 60000s python /usr/local/lib/ahmia/tools/test_hidden_services.py >>/usr/local/lib/ahmia/error/tools_test.log 2>&1
|
8 |
| -# ONLY ONCE A WEEK: Check the backlinks |
9 |
| -0 1 * * 1 timeout 600000s python /usr/local/lib/ahmia/tools/gather_backlinks_data.py >>/usr/local/lib/ahmia/error/tools_backlinks.log 2>&1 |
10 |
| -# Every hour destroy possible IP addresses from the error logs |
11 |
| -0 * * * * sed -i s/'\['client.*'\]'/'\['0.0.0.0'\]'/ /usr/local/lib/ahmia/error/error.log 2>&1 |
12 |
| -# Once a week remove the whole log files |
13 |
| -0 2 * * 1 echo "" > /usr/local/lib/ahmia/error/error.log |
14 |
| -0 3 * * 1 echo "" > /usr/local/lib/ahmia/error/access.log |
| 15 | +# |
| 16 | +#EVERY WEEK |
| 17 | +# Once a week analyze and remove the log files |
| 18 | +#1 1 * * 1 |
| 19 | +2 1 * * 1 echo "" > /usr/local/lib/ahmia/error/error.log |
| 20 | +3 1 * * 1 echo "" > /usr/local/lib/ahmia/error/access.log |
| 21 | +4 1 * * 1 echo "" > /usr/local/lib/ahmia/error/hs_error.log |
| 22 | +5 1 * * 1 echo "" > /usr/local/lib/ahmia/error/hs_access.log |
| 23 | +# Once a week check the backlinks |
| 24 | +#6 1 * * 1 timeout 600000s python /usr/local/lib/ahmia/tools/gather_backlinks_data.py >>/usr/local/lib/ahmia/error/tools_backlinks.log 2>&1 |
15 | 25 | # Once a week create database backup
|
16 |
| -0 4 * * 1 pg_dump -U ahmia_login ahmia_db -f /usr/local/lib/ahmia/backups/sql/$(date -d "today" +"%Y-%m-%d")-db_backup.sql |
| 26 | +7 1 * * 1 pg_dump -U ahmia_login ahmia_db -f /usr/local/lib/ahmia/backups/sql/$(date -d "today" +"%Y-%m-%d")-db_backup.sql |
| 27 | +# Create a snapshot from the addresses with their descriptions |
| 28 | +8 1 * * 1 curl -i "Content-Type: application/json" https://ahmia.fi/address/ > /usr/local/lib/ahmia/backups/addresses/$(date -d "today" +"%Y-%m-%d")-addresses_snapshot.json |
0 commit comments