Commit 276051f1 authored by Daniel's avatar Daniel

Update overlay/root/scripts/nc_config.sh

parent 347bbcb8
......@@ -34,28 +34,23 @@ fi
# reset permissions
. /root/scripts/nc_restore_permissions.sh
####
# setup nextcloud initial settings via occ
####
echo "nextcloud: setup via occ"
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#command-line-installation
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html
# Use occ to complete Nextcloud installation
occ maintenance:install --database '${DB_TYPE}' --database-name '${DB_NAME}' --database-user '${DB_ROOT}' --database-pass='${DB_ROOT_PW}' --database-host 'localhost:${file_mysql_sock}' --admin-user '${NC_ROOT}' --admin-pass '${NC_ROOT_PW}' --data-dir '${dir_nextcloud_data}'
occ maintenance:mode --on
occ config:system:set trusted_domains 0 --value '${servername}'
occ config:system:set trusted_domains 1 --value '${serverip}'
occ config:system:set overwrite.cli.url --value "https://${servername}"
occ config:system:set mysql.utf8mb4 --value "true"
occ config:system:set log_type --value "file"
occ config:system:set logfile. --value "/var/log/nextcloud/nextcloud.log"
occ config:system:set logfilemode --value "0640"
# setup cron job for nextcloud
echo "nextcloud: setup cronjob"
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html
#https://www.golinuxcloud.com/create-schedule-cron-job-shell-script-linux/
# create dir and permissions
......@@ -66,6 +61,3 @@ crontab -u $WWW_USER - <<eof
eof
# select cron as service
occ background:cron
occ maintenance:mode --off
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment