Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# ------------------------------------------------------------------------------
# vpn-uptime-restart.sh
#
# Monitors the VPN container in a Docker Compose stack, restarts the stack if the
# VPN is down or unhealthy, and restarts dependent containers whose uptime
# exceeds the VPN's uptime. Sends notifications via Pushover.
#
# Main variables to set/change:
# COMPOSE_FILE - Path to your docker-compose.yml file