added cronjob for log removal proof

This commit is contained in:
nihilist 2024-03-20 18:46:41 +01:00
parent d92c334abb
commit 094b1be1a7

24
4-Scripts/crontab.txt Normal file
View File

@ -0,0 +1,24 @@
10 17 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
@monthly docker-compose -f /srv/invidious/docker-compose.yml down --remove-orphans ; cp /srv/invidious/docker-compose.yml /srv/invidious.docker-compose.yml.backup ; git -C /srv/invidious reset --hard; git -C /srv/invidious pull ; cp /srv/invidious.docker-compose.yml.backup /srv/invidious/docker-compose.yml ; docker image prune -f ; docker-compose -f /srv/invidious/docker-compose.yml pull ;docker-compose -f /srv/invidious/docker-compose.yml up -d --build --force-recreate # monthly invidious upgrade!
0 0,6,12,18 * * * /usr/bin/python3 /srv/smart-ipv6-rotator/smart-ipv6-rotator.py clean ; /usr/bin/python3 /srv/smart-ipv6-rotator/smart-ipv6-rotator.py run --ipv6range="IPV6RANGE/64" ; docker-compose -f /srv/invidious/docker-compose.yml stop ; docker-compose -f /srv/invidious/docker-compose.yml up -d
0 0,6,12,18 * * * docker-compose -f /srv/searxng-docker/docker-compose.yaml stop ; docker-compose -f /srv/searxng-docker/docker-compose.yaml up -d
@daily docker-compose -f /srv/safetwitch/docker-compose.yml down --remove-orphans ; cp /srv/safetwitch/docker-compose.yml /srv/safetwitch.docker-compose.yml.bak; git -C /srv/safetwitch/ pull ; docker-compose -f /srv/safetwitch/docker-compose.yml pull ; docker-compose -f /srv/safetwitch/docker-compose.yml up -d
@hourly /usr/bin/rm /var/log/*.log /var/log/*/*.log /var/log/*/*/*.log ; touch /var/log/auth.log ; touch /var/log/syslog ; apt clean -y ; apt autoremove -y ; systemctl restart fail2ban
@hourly apt clean -y ; apt autoremove -y
@hourly docker image prune
@daily kill -9 $(pidof iftop)
0 */1 * * * docker restart invidious_invidious_1 ; docker restart invidious_invidious_6
1 */1 * * * docker restart invidious_invidious_2 ; docker restart invidious_invidious_7
2 */1 * * * docker restart invidious_invidious_3 ; docker restart invidious_invidious_8
3 */1 * * * docker restart invidious_invidious_4 ; docker restart invidious_invidious_9
4 */1 * * * docker restart invidious_invidious_5 ; docker restart invidious_invidious_10
5 */1 * * * docker restart invidious_invidious_6 ; docker restart invidious_invidious_11