I'm new to Proxmox and not finding satisfactory information for shutdown procedures for my Workstation.
I want to shut down everything properly using a bash script inside the VMs when pressing or holding the physical power button.
Google Gemini is saying something about installing
Here is a boilerplate example for when I press the power button, I want a similar script to run in the VM.
Thanks
I want to shut down everything properly using a bash script inside the VMs when pressing or holding the physical power button.
Google Gemini is saying something about installing
acpid which hasn't been in Debian since Wheezy.Here is a boilerplate example for when I press the power button, I want a similar script to run in the VM.
Bash:
#!/bin/bash
# Define the directory where your docker-compose.yml file is located
COMPOSE_DIR="/path/to/your/project"
cd "$COMPOSE_DIR"
echo "Stopping and removing Docker Compose containers in $COMPOSE_DIR..."
# Stop and remove containers, networks, and anonymous volumes
# -v: Removes named volumes
# --remove-orphans: Removes containers for services not defined in the Compose file
docker compose down -v --remove-orphans
echo "Docker Compose shutdown complete."
Thanks
Last edited: