Initial
This commit is contained in:
commit
cb68d93e59
15
wp-cloudron-update.sh
Normal file
15
wp-cloudron-update.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
mapfile -t CONTAINERS < <(docker container ls --format '{{ .ID }},{{ .Image }}' | grep wordpress)
|
||||||
|
|
||||||
|
DRY_RUN=" --dry-run"
|
||||||
|
|
||||||
|
if [ "$1" == "--live" ]; then
|
||||||
|
DRY_RUN=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in "${!CONTAINERS[@]}"; do
|
||||||
|
CONTAINERID="${CONTAINERS[$i]%,*}"
|
||||||
|
echo "Site $i, $CONTAINERID"
|
||||||
|
docker exec -u www-data -it "${CONTAINERID}" /app/pkg/wp plugin update --all $DRY_RUN
|
||||||
|
docker exec -u www-data -it "${CONTAINERID}" /app/pkg/wp theme update --all $DRY_RUN
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user