if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable
@ -139,11 +139,7 @@ The install and update script is only triggered when a default command is used (
- `NEXTCLOUD_UPDATE` (default: `0`)
If you share your html folder with multiple docker containers, you might want to avoid multiple processes updating the same shared volume
- `NEXTCLOUD_INIT_LOCK` (not set by default) Set it to true to enable initialization locking. Other containers will wait for the current process to finish updating the html volume to continue.
You might also want to make sure the htaccess is up to date after each container update. Especially on multiple swarm nodes as any discrepancy will make your server unusable.
You might want to make sure the htaccess is up to date after each container update. Especially on multiple swarm nodes as any discrepancy will make your server unusable.
- `NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization.
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
(
if ! flock -n 9;then
# If we couldn't get it immediately, show a message, then wait for real
echo"Another process is initializing Nextcloud. Waiting..."
flock 9
fi
if version_greater "$image_version""$installed_version";then
echo"Initializing nextcloud $image_version ..."
if["$installed_version" !="0.0.0.0"];then
echo"Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list'| sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
if version_greater "$installed_version""$image_version";then
echo"Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
exit1
fi
# If another process is syncing the html folder, wait for
# it to be done, then escape initalization.
# You need to define the NEXTCLOUD_INIT_LOCK environment variable