update script to add the profiles option automatically

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-12-23 21:40:15 +01:00
parent ce165e05a1
commit a81be7c35c

View file

@ -92,6 +92,11 @@ do
if [ "$name" != "nextcloud-aio-apache" ]; then
OUTPUT="$(echo "$OUTPUT" | sed "/ $name:/i\ ")"
fi
if ! echo "$name" | grep "apache$" && ! echo "$name" | grep "database$" && ! echo "$name" | grep "nextcloud$" && ! echo "$name" | grep "redis$"; then
sed -i '/container_name/d' containers.yml
SLIM_NAME="${name##nextcloud-aio-}"
OUTPUT="$(echo "$OUTPUT" | sed "/container_name: $name$/a\ \ \ \ profiles:\ \[\"$SLIM_NAME\"\]")"
fi
done
OUTPUT="$(echo "$OUTPUT" | sed "/restart: /a\ \ \ \ networks:\n\ \ \ \ \ \ - nextcloud-aio")"