diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index 1420439c..a7773cee 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -31,7 +31,7 @@ async def block_skylinks_from_airtable(): offset = None retry = 0 while len(skylinks) == 0 or offset: - print("Requesting a batch of records from Airtable with " + (offset if offset else "empty") + " offset" + (" (retry " + retry + ")" if retry else "")) + print("Requesting a batch of records from Airtable with " + (offset if offset else "empty") + " offset" + (" (retry " + str(retry) + ")" if retry else "")) query = "&".join(["fields%5B%5D=" + AIRTABLE_FIELD, ("offset=" + offset) if offset else ""]) response = requests.get( "https://api.airtable.com/v0/" + AIRTABLE_BASE + "/" + AIRTABLE_TABLE + "?" + query, diff --git a/setup-scripts/support/logrotate b/setup-scripts/support/logrotate new file mode 100644 index 00000000..81c7e40f --- /dev/null +++ b/setup-scripts/support/logrotate @@ -0,0 +1,13 @@ +/home/user/skynet-webportal/docker/data/nginx/logs/*.log { + hourly + dateext + rotate 3650 + missingok + notifempty + nocompress + create 640 root root + sharedscripts + postrotate + docker exec nginx sh -c '! test -f /usr/local/openresty/nginx/logs/nginx.pid' || docker exec nginx sh -c 'kill -USR1 $(cat /usr/local/openresty/nginx/logs/nginx.pid)' + endscript +} \ No newline at end of file