Apache sınırlarına ulaştığında otomatik restart eden bash script
1 2 3 4 5 6 7 8 | #!/bin/bash rm -rf test.file wget -q -t 1 --timeout=10 http://example.com/example.txt -O test.file if [ ! -s "test.file" ] then /etc/init.d/httpd restart fi exit $? |
son olarak cronjob olarak ekleyebilirsiniz.
Not: her dakika çalışmaktadır.
1 | * * * * * /bin/bash /path/file.sh >/dev/null 2>&1 |