mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-23 21:36:19 +08:00
try to remove readonly from global volumes automatically
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
26188f797d
commit
011356343f
1 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,15 @@ for variable in "${DEPLOYMENTS[@]}"; do
|
|||
sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable"
|
||||
done
|
||||
sed -i "s|volumeMountsInitContainer|volumeMounts|" "$variable"
|
||||
if grep -q claimName "$variable"; then
|
||||
claimNames="$(grep claimName "$variable")"
|
||||
mapfile -t claimNames <<< "$claimNames"
|
||||
for claimName in "${claimNames[@]}"; do
|
||||
if grep -A1 "^$claimName$" "$variable" | grep -q "readOnly: true"; then
|
||||
sed -i "/^$claimName$/{n;d}" "$variable"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# shellcheck disable=SC1083
|
||||
|
|
Loading…
Reference in a new issue