mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
improve logging
Signed-off-by: enoch85 <github@hanssonit.se>
This commit is contained in:
parent
b533277ddf
commit
cb5763d5cf
@ -293,7 +293,6 @@ then
|
||||
clear
|
||||
else
|
||||
dpkg-reconfigure tzdata
|
||||
clear
|
||||
fi
|
||||
|
||||
# Change timezone in PHP
|
||||
@ -301,6 +300,7 @@ sed -i "s|;date.timezone.*|date.timezone = $(cat /etc/timezone)|g" "$PHP_INI"
|
||||
|
||||
# Change timezone for logging
|
||||
occ_command config:system:set logtimezone --value="$(cat /etc/timezone)"
|
||||
clear
|
||||
|
||||
# Check where the best mirrors are and update
|
||||
msg_box "To make downloads as fast as possible when updating you should have mirrors that are as close to you as possible.
|
||||
|
||||
@ -386,10 +386,14 @@ sed -i "s|post_max_size =.*|post_max_size = 1100M|g" $PHP_INI
|
||||
sed -i "s|upload_max_filesize =.*|upload_max_filesize = 1000M|g" $PHP_INI
|
||||
|
||||
# Set loggging
|
||||
occ_command config:system:set loglevel --value=3
|
||||
occ_command config:system:set log_type --value=file
|
||||
occ_command config:system:set logfile --value="$VMLOGS/nextcloud.log"
|
||||
-occ_command config:system:set log_type --value=file
|
||||
-occ_command config:system:set logfile --value="$VMLOGS/nextcloud.log"
|
||||
touch "$VMLOGS/nextcloud.log"
|
||||
rm -f "$NCDATA/nextcloud.log"
|
||||
occ_command config:system:set loglevel --value=2
|
||||
occ_command config:app:set admin_audit logfile --value="$VMLOGS/audit.log"
|
||||
touch "$VMLOGS/audit.log"
|
||||
install_and_enable_app admin_audit
|
||||
|
||||
# Set SMTP mail
|
||||
occ_command config:system:set mail_smtpmode --value="smtp"
|
||||
|
||||
@ -30,14 +30,19 @@ print_text_in_color "$IGreen" "Setting secure permissions..."
|
||||
print_text_in_color "$ICyan" "Creating possible missing Directories"
|
||||
mkdir -p "$NCPATH"/data
|
||||
mkdir -p "$NCPATH"/updater
|
||||
mkdir -p "$VMLOGS"
|
||||
mkdir -p "$NCDATA"
|
||||
|
||||
print_text_in_color "$ICyan" "chmod Files and Directories"
|
||||
find "${NCPATH}"/ -type f -print0 | xargs -0 chmod 0640
|
||||
find "${VMLOGS}"/nextcloud.log -type f -print0 | xargs -0 chmod 0640
|
||||
find "${VMLOGS}"/audit.log -type f -print0 | xargs -0 chmod 0640
|
||||
find "${NCPATH}"/ -type d -print0 | xargs -0 chmod 0750
|
||||
|
||||
print_text_in_color "$ICyan" "chown Directories"
|
||||
chown -R "${rootuser}":"${htgroup}" "${NCPATH}"/
|
||||
chown -R "${htuser}":"${htgroup}" "${VMLOGS}"/nextcloud.log
|
||||
chown -R "${htuser}":"${htgroup}" "${VMLOGS}"/audit.log
|
||||
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/apps/
|
||||
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/config/
|
||||
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/themes/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user