28 lines
722 B
Bash
Executable file
28 lines
722 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -u
|
|
set -e
|
|
|
|
WORKDIR=/var/www/html
|
|
counter=0
|
|
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
|
|
echo "GYR:POSTDEPLOY:WAITING"
|
|
counter=$((counter+1))
|
|
sleep 1
|
|
done
|
|
cd "$WORKDIR" || exit 1
|
|
|
|
echo "GYR:POSTDEPLOY:START ($(pwd))"
|
|
find . -maxdepth 1
|
|
echo "GYR:POSTDEPLOY:UPGRADE"
|
|
php -d memory_limit=-1 occ upgrade
|
|
echo "GYR:POSTDEPLOY:DB"
|
|
php -d memory_limit=-1 occ db:convert-filecache-bigint
|
|
php -d memory_limit=-1 occ db:add-missing-indices
|
|
echo "GYR:POSTDEPLOY:HTACCESS"
|
|
php -d memory_limit=-1 occ maintenance:update:htaccess
|
|
echo "GYR:POSTDEPLOY:MAINTENANCE:OFF"
|
|
php -d memory_limit=-1 occ maintenance:mode --off
|
|
php -d memory_limit=-1 occ maintenance:mode --off || true
|
|
echo "GYR:POSTDEPLOY:END"
|
|
|