2023-11-22 08:26:10 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
2023-12-03 10:22:27 +01:00
|
|
|
services=(cryptpad etebase mc nginx-www searxng synapse syncthing vw)
|
2023-11-22 08:26:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
if [[ ! $(echo "${services[*]} all" | grep -P "\b$1\b" ) ]]; then
|
|
|
|
echo "Wrong argument."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
rel_path="$(dirname "$0")"
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
vw|all)
|
|
|
|
sudo "$rel_path/vw/backup.sh" || exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "$1" != "all" ]]; then
|
|
|
|
docker-compose -f "$rel_path/$1/docker-compose.yaml" pull
|
|
|
|
docker-compose -f "$rel_path/$1/docker-compose.yaml" up -d
|
|
|
|
else
|
|
|
|
for service in "${services[@]}"; do
|
|
|
|
docker-compose -f "$rel_path/$service/docker-compose.yaml" pull
|
|
|
|
docker-compose -f "$rel_path/$service/docker-compose.yaml" up -d
|
|
|
|
done
|
|
|
|
fi
|