2024-07-20 14:47:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -u
|
|
|
|
set -e
|
|
|
|
|
2024-07-20 14:54:11 +00:00
|
|
|
echo "== Running post-installation hooks as $(id -un) user =="
|
2024-07-20 14:47:28 +00:00
|
|
|
|
|
|
|
# wait for nextcloud to be initialized
|
|
|
|
WORKDIR=/var/www/html
|
|
|
|
counter=0
|
|
|
|
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
|
|
|
|
echo "GX:POST-INSTALLATION:WAITING"
|
|
|
|
counter=$((counter+1))
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
cd "$WORKDIR" || exit 1
|
|
|
|
|
|
|
|
echo "GX:POST-INSTALLATION:START ($(pwd))"
|
|
|
|
# # find . -maxdepth 1
|
|
|
|
# echo "GX:POST-INSTALLATION:UPGRADE"
|
|
|
|
# php -d memory_limit=-1 occ upgrade
|
|
|
|
# echo "GX:POST-INSTALLATION:DB"
|
|
|
|
# php -d memory_limit=-1 occ db:convert-filecache-bigint
|
|
|
|
# php -d memory_limit=-1 occ db:add-missing-indices
|
|
|
|
# echo "GX:POST-INSTALLATION:HTACCESS"
|
|
|
|
# php -d memory_limit=-1 occ maintenance:update:htaccess
|
|
|
|
# echo "GX:POST-INSTALLATION:MAINTENANCE:OFF"
|
|
|
|
# php -d memory_limit=-1 occ maintenance:mode --off
|
|
|
|
# php -d memory_limit=-1 occ maintenance:mode --off || true
|
|
|
|
echo "GX:POST-INSTALLATION:END"
|
|
|
|
|