1
0
Fork 0
mirror of synced 2024-11-16 22:25:33 -05:00
ovpn-admin/stop.sh

20 lines
292 B
Bash
Raw Normal View History

2024-01-01 12:14:00 -05:00
#!/usr/bin/env bash
2024-01-01 13:00:20 -05:00
set -eo pipefail
2024-01-01 12:14:00 -05:00
if [ ! -f .env ]; then
echo "Please create a .env file"
exit 1
fi
2024-01-01 12:52:35 -05:00
set -a
2024-01-01 12:14:00 -05:00
source .env
2024-01-01 12:52:35 -05:00
set +a
2024-01-01 12:14:00 -05:00
2024-01-01 12:54:51 -05:00
docker-compose -p "$OVPN_COMPOSE_NAME" down "$@"
2024-01-01 12:14:00 -05:00
2024-01-01 13:04:05 -05:00
for script_file in ./stop.d/*.sh
2024-01-01 12:14:00 -05:00
do
echo "Sourcing ${script_file}"
source "${script_file}"
done