Keeps
docker-desktop
for Ubuntu from staying in a corrupted / semi-crashed state.
- zx
- axios
- node
- ubuntu /
systemctl
My docker-desktop
runs pihole among other things, but for whatever reason, docker-desktop
on Ubuntu 22.04 is fairly unstable. This script will check if docker-desktop
has stopped responding. If it has, it will try to restart it.
Using userland crontab -e
, we can set this zx
script to regularly run and fix docker if it breaks.
*/1 * * * * DOTENV_CONFIG_PATH=/home/ryan/services/docker-liveness/.env DOTENV_CONFIG_DEBUG=true /home/ryan/services/docker-liveness/index.js >> /home/ryan/services/docker-liveness/script.log 2>&1
Make your .env
file with appropriate values:
DOCKER_LIVENESS_DISCORD_WEBHOOK_URL=