Skip to content

Commit

Permalink
show disabled apps
Browse files Browse the repository at this point in the history
  • Loading branch information
tilosp committed Apr 17, 2017
1 parent 87c6513 commit ae5b15c
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 10.0/apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions 10.0/fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions 11.0/apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions 11.0/fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions 9.0/apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions 9.0/fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down
9 changes: 9 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if version_greater "$installed_version" "$image_version"; then
fi

if version_greater "$image_version" "$installed_version"; then
if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
fi

rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/

if [ ! -d /var/www/html/config ]; then
Expand All @@ -34,6 +38,11 @@ if version_greater "$image_version" "$installed_version"; then

if [ "$installed_version" != "0.0.0~unknown" ]; then
su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'

su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
echo "The following apps have beed disabled:"
diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
rm -f /tmp/list_before /tmp/list_after
fi
fi

Expand Down

0 comments on commit ae5b15c

Please sign in to comment.