0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-15 19:05:09 +01:00

simplify output

This commit is contained in:
Marc Bihlmaier 2018-05-22 10:29:50 +02:00 committed by Tilo Spannagel
parent 658929b23f
commit 2994ff19c5
No known key found for this signature in database
GPG key ID: E517E9F206B8993D
10 changed files with 30 additions and 40 deletions

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi

View file

@ -34,11 +34,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
fi fi
if version_greater "$image_version" "$installed_version"; then if version_greater "$image_version" "$installed_version"; then
echo "Initializing nextcloud $image_version ..."
if [ "$installed_version" != "0.0.0.0" ]; then if [ "$installed_version" != "0.0.0.0" ]; then
echo -n "Running upgrade from $installed_version to $image_version ... " echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
else
echo "Initializing new instance with version $image_version ... "
fi fi
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown www-data:root" rsync_options="-rlDog --chown www-data:root"
@ -52,6 +51,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
echo "Initializing finished"
#install #install
if [ "$installed_version" = "0.0.0.0" ]; then if [ "$installed_version" = "0.0.0.0" ]; then
@ -106,7 +106,6 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
rm -f /tmp/list_before /tmp/list_after rm -f /tmp/list_before /tmp/list_after
fi fi
echo "finished."
fi fi
fi fi