nextcloudpi/updates/1.18.0.sh
nachoparker c10d4bd8fb upgrade to NC21.0.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-12 16:55:46 -06:00

44 lines
993 B
Bash

#!/bin/bash
set -e
## BACKWARD FIXES ( for older images )
source /usr/local/etc/library.sh # sets NCLATESTVER PHPVER RELEASE
# all images
# restore sources in stretch
sed -i "s/buster/$RELEASE/g" /etc/apt/sources.list.d/* &>/dev/null || true
# restore smbclient after dist upgrade
apt_install php${PHPVER}-gmp
# Update modsecurity config file only if user is already in buster and
# modsecurity is used.
# https://github.com/nextcloud/nextcloudpi/issues/959
is_active_app modsecurity && run_app modsecurity
# fix armbian disabling unattended-upgrades
is_active_app unattended-upgrades && run_app unattended-upgrades
# groupfolders fix
install_app nc-backup
# docker images only
[[ -f /.docker-image ]] && {
:
}
# for non docker images
[[ ! -f /.docker-image ]] && {
# fix fail2ban with UFW
mkdir -p /etc/systemd/system/fail2ban.service.d/
cat > /etc/systemd/system/fail2ban.service.d/touch-ufw-log.conf <<EOF
[Service]
ExecStartPre=/bin/touch /var/log/ufw.log
EOF
}
exit 0