Check that data directory gets created

This commit is contained in:
Bob Mottram 2017-06-04 10:17:52 +01:00
parent 8803eb6e5f
commit b9cac5dcbf
1 changed files with 7 additions and 0 deletions

View File

@ -610,6 +610,13 @@ function install_nextcloud_main {
chmod +x occ
./occ maintenance:install --database-name nextcloud --admin-user ${MY_USERNAME} --admin-pass "${NEXTCLOUD_ADMIN_PASSWORD}" --database mysql --database-user root --database-pass "${MARIADB_PASSWORD}"
if [ ! -d data ]; then
echo $'Nextcloud data directory was not found. This probably means that the installation failed.'
echo ''
echo $'Install command was:'
echo "./occ maintenance:install --database-name nextcloud --admin-user ${MY_USERNAME} --admin-pass \"${NEXTCLOUD_ADMIN_PASSWORD}\" --database mysql --database-user root --database-pass \"${MARIADB_PASSWORD}\""
exit 83522
fi
chown -R www-data:www-data config
chown -R www-data:www-data data
./occ check