Skip to content

Commit 78d7072

Browse files
authored
Ubuntu 24.04 (#89)
1 parent 4598805 commit 78d7072

30 files changed

+120
-49
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
### https://www.techandme.se
55
### https://www.hanssonit.se/wordpress-vm/
66

7-
- Ubuntu 22.04 Server
8-
- MariaDB 10.10
7+
- Ubuntu 24.04 Server
8+
- MariaDB 11.4
99
- NGINX 1.26 (with Brotli support)
10-
- PHP-FPM 8.1
10+
- PHP-FPM 8.4
1111
- Latest Wordpress (updates automatically)
1212
- WP-CLI
1313
- Redis Cache

addons/automatic_updates.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
# shellcheck disable=2034,2059
66
true

addons/brotli-nginx.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
4+
# Copyright © 2024 Simon Lindner (https://github.com/szaimen)
5+
6+
# shellcheck disable=2034,2059
7+
true
8+
SCRIPT_NAME="Nginx Brotli"
9+
SCRIPT_EXPLAINER="Enables Brotli compression support for Nginx"
10+
# shellcheck source=lib.sh
11+
source /var/scripts/fetch_lib.sh || source <(curl -sL https://raw.githubusercontent.com/techandme/wordpress-vm/master/lib.sh)
12+
13+
# Check for errors + debug code and abort if something isn't right
14+
# 1 = ON
15+
# 0 = OFF
16+
DEBUG=0
17+
debug_mode
18+
19+
# Check if root
20+
root_check
21+
22+
# Replace old Nginx with Brotli supported Nginx
23+
if [ ! -f /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf ]
24+
then
25+
install_if_not ppa-purge
26+
ppa-purge nginx/stable
27+
rm -f /etc/apt/sources.list.d/nginx*
28+
check_command yes | add-apt-repository ppa:ondrej/nginx
29+
apt update -q4 && spinner_loading
30+
install_if_not nginx
31+
systemctl stop nginx
32+
systemctl start nginx
33+
systemctl enable nginx
34+
apt-get purge ppa-purge -y
35+
apt-get autoremove -y
36+
else
37+
exit
38+
fi
39+
40+
# Enable Brotli
41+
install_if_not libnginx-mod-brotli
42+
echo "load_module modules/ngx_http_brotli_filter_module.so;" > /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf
43+
44+
# Enable Brotli in config
45+
rm -f /etc/nginx/nginx.conf
46+
curl_to_dir "$STATIC" nginx.conf /etc/nginx/
47+
48+
# Restart Nginx
49+
if nginx -t
50+
then
51+
systemctl restart nginx
52+
fi

addons/locales.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
# shellcheck disable=2034,2059,1091
66
true

addons/locate_mirror.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
# shellcheck disable=2034,2059
66
true

addons/redis-server-ubuntu.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SCRIPT_NAME="Redis Server Ubuntu"
55
# shellcheck source=lib.sh
66
source /var/scripts/fetch_lib.sh || source <(curl -sL https://raw.githubusercontent.com/techandme/wordpress-vm/master/lib.sh)
77

8-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
8+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
99

1010
# Check for errors + debug code and abort if something isn't right
1111
# 1 = ON
@@ -17,9 +17,9 @@ debug_mode
1717
root_check
1818

1919
# Check Ubuntu version
20-
if ! version 18.04 "$DISTRO" 22.04.10
20+
if ! version 20.04 "$DISTRO" 24.04.10
2121
then
22-
msg_box "Your current Ubuntu version is $DISTRO but must be between 18.04 - 22.04.10 to run this script."
22+
msg_box "Your current Ubuntu version is $DISTRO but must be between 20.04 - 24.04.10 to run this script."
2323
msg_box "Please contact us to get support for upgrading your server:
2424
https://www.hanssonit.se/#contact
2525
https://shop.hanssonit.se/"

addons/smtp-mail.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
# shellcheck disable=2034,2059
66
true

apps/adminer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
# shellcheck disable=2034,2059
66
true

apps/bpytop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
# shellcheck disable=2034,2059
66
true

apps/fail2ban.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# T&M Hansson IT AB © - 2023, https://www.hanssonit.se/
3+
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44
# Inspired by https://github.com/nextcloud/nextcloudpi/blob/master/etc/nextcloudpi-config.d/fail2ban.sh
55

66
# shellcheck disable=2034,2059

0 commit comments

Comments
 (0)