Commit 5078d54f authored by Daniel's avatar Daniel

Update overlay/root/scripts/nc_config.sh, post_install.sh,...

Update overlay/root/scripts/nc_config.sh, post_install.sh, overlay/root/scripts/redis_config.sh, overlay/root/scripts/_CONFIG_VARS_.sh, overlay/root/scripts/_PATHS_.sh files
parent dab9931e
......@@ -32,6 +32,7 @@ NC_ROOT_PW=`generate_secret ncpassword`
# default web user running nginx / php ...
WWW_USER="www"
WWW_GROUP="www"
# get domain name from /etc/resolv.conf (given by dhcp)
......
......@@ -11,7 +11,7 @@ file_mysql_sock=/tmp/mysql.sock
# nextcloud
dir_nc_log=/var/log/nextcloud
file_nc_log=/var/log/nextcloud.log
dir_nextcloud="${dir_www}/nextcloud"
dir_nextcloud_data="${dir_www}/nextcloud-data"
dir_nextcloud_sessions="${dir_www}/nextcloud-sessions-tmp"
......
......@@ -8,7 +8,7 @@ echo; echo "nextcloud: setup php-fpm config"
cp ${file_php_fpm_nc_conf} "${file_php_fpm_nc_conf}.bkp"
# update some options
conf_update -c ${file_php_fpm_nc_conf} -o "^listen" -v "$file_php_fpm_sock"
conf_update -c ${file_php_fpm_nc_conf} -o "^php_admin_value\[session.save_path\]" -v "$dir_nextcloud_sessions"
conf_update -c ${file_php_fpm_nc_conf} -o "php_admin_value\[session.save_path\]" -v "$dir_nextcloud_sessions"
conf_update -c ${file_php_fpm_nc_conf} -o "^env\[PATH\]" -v "$PATH"
change_config_value_by_vars ${file_php_fpm_nc_conf}
......@@ -57,9 +57,21 @@ 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"
echo; echo "nextcloud: setup nextcloud logging"
#https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html
# create logfile and setup rights
touch ${file_nc_log}
chown "${WWW_USER}:${WWW_GROUP}" ${file_nc_log}
chmod 640 ${file_nc_log}
# register logging in nextcloud
occ config:system:set log_type --value "file"
occ config:system:set logfile. --value "/var/log/nextcloud/nextcloud.log"
occ config:system:set logfile. --value "${file_nc_log}"
occ config:system:set logfilemode --value "0640"
occ config:system:set loglevel --value 3
occ config:system:set logdateformat --value "F d, Y H:i:s"
echo; echo "nextcloud: setup cronjob"
......
......@@ -42,6 +42,7 @@ echo "redis: register redis in nextcloud"
# caching with redis
occ config:system:set redis host --value "${file_redis_sock}"
occ config:system:set redis sock --value "0"
occ config:system:set memcache.local --value="\\OC\\Memcache\\Redis"
occ config:system:set memcache.distributed --value='\\OC\\Memcache\\Redis'
occ config:system:set memcache.locking --value='\\OC\\Memcache\\Redis'
......@@ -54,6 +54,7 @@ echo "main: applying nextcloud tuning"
echo "Starting php-fpm"
#service php-fpm restart 2>/dev/null
service php-fpm restart
service redis restart
#nginx restarts to fast while php is not fully started yet
echo "Starting nginx"
......
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