|
1 | 1 | #!/bin/sh |
2 | 2 |
|
3 | | -# Hestia Control Panel upgrade script for target version 1.2.2 |
| 3 | +# Hestia Control Panel upgrade script for target version 1.2.3 |
4 | 4 |
|
5 | 5 | ####################################################################################### |
6 | 6 | ####### Place additional commands below. ####### |
7 | 7 | ####################################################################################### |
8 | | - |
9 | | -# Update template files to add warnings |
10 | | -# Backup current templates |
11 | | -echo "[ ! ] Updating default web domain templates..." |
12 | | -$BIN/v-update-web-templates |
13 | | -echo "[ ! ] Updating default mail domain templates..." |
14 | | -$BIN/v-update-mail-templates |
15 | | -echo "[ ! ] Updating default DNS zone templates..." |
16 | | -$BIN/v-update-dns-templates |
17 | | - |
18 | | -# Enhance Vsftpd security |
19 | | -if [ "$FTP_SYSTEM" = "vsftpd" ]; then |
20 | | - echo "[ ! ] Hardening Vsftpd TLS configuration..." |
21 | | - if [ -e /etc/vsftpd.conf ]; then |
22 | | - rm -f /etc/vsftpd.conf |
23 | | - fi |
24 | | - cp -f $HESTIA_INSTALL_DIR/vsftpd/vsftpd.conf /etc/ |
25 | | - chmod 644 /etc/vsftpd.conf |
26 | | -fi |
27 | | - |
28 | | - |
29 | | -# Rework apt repositories |
30 | | -apt="/etc/apt/sources.list.d" |
31 | | -echo "[ * ] Hardening APT repositories..." |
32 | | -if [ -f "$apt/nginx.list" ]; then |
33 | | - if grep -q "http://nginx.org/packages/mainline/" $apt/nginx.list; then |
34 | | - echo " ----- NGINX" |
35 | | - sed -i "s/http\:\/\/nginx.org/https\:\/\/nginx.org/g" $apt/nginx.list |
36 | | - fi |
37 | | -fi |
38 | | - |
39 | | -if [ -f "$apt/php.list" ]; then |
40 | | - if grep -q "http://packages.sury.org/" $apt/php.list; then |
41 | | - echo " ----- PHP" |
42 | | - sed -i "s/http\:\/\/packages.sury.org/https\:\/\/packages.sury.org/g" $apt/php.list |
43 | | - fi |
44 | | -fi |
45 | | - |
46 | | -if [ -f "$apt/mariadb.list" ]; then |
47 | | - if grep -q "http://ams2.mirrors.digitalocean.com" $apt/mariadb.list; then |
48 | | - echo " ----- MariaDB" |
49 | | - sed -i "s/http\:\/\/ams2.mirrors.digitalocean.com/https\:\/\/mirror.mva-n.net/g" $apt/mariadb.list |
50 | | - fi |
51 | | -fi |
52 | | - |
53 | | -if [ -f "$apt/postgresql.list" ]; then |
54 | | - if grep -q "http://apt.postgresql.org" $apt/postgresql.list; then |
55 | | - echo " ----- PostgreSQL" |
56 | | - sed -i "s/http\:\/\/apt.postgresql.org/https\:\/\/apt.postgresql.org/g" $apt/postgresql.list |
57 | | - fi |
58 | | -fi |
0 commit comments