-
-
Notifications
You must be signed in to change notification settings - Fork 304
/
Copy path1.18.0.sh
43 lines (31 loc) · 993 Bytes
/
1.18.0.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/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