File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,35 @@ echo "[ ! ] Updating default mail domain templates..."
1515$BIN /v-update-mail-templates
1616echo " [ ! ] Updating default DNS zone templates..."
1717$BIN /v-update-dns-templates
18+
19+ # Rework apt repositories
20+ apt=" /etc/apt/sources.list.d"
21+ echo " [*] Hardening apt repositories..."
22+
23+ if [ -f " $apt /nginx.list" ]; then
24+ if grep -q " http://nginx.org/packages/mainline/" $apt /nginx.list; then
25+ echo " [ * ] NGINX"
26+ sed -i " s/http\:\/\/nginx.org/https\:\/\/nginx.org/g" $apt /nginx.list
27+ fi
28+ fi
29+
30+ if [ -f " $apt /php.list" ]; then
31+ if grep -q " http://packages.sury.org/" $apt /php.list; then
32+ echo " [ * ] PHP"
33+ sed -i " s/http\:\/\/packages.sury.org/https\:\/\/packages.sury.org/g" $apt /php.list
34+ fi
35+ fi
36+
37+ if [ -f " $apt /mariadb.list" ]; then
38+ if grep -q " http://ams2.mirrors.digitalocean.com" $apt /mariadb.list; then
39+ echo " [ * ] MariaDB"
40+ sed -i " s/http\:\/\/ams2.mirrors.digitalocean.com/https\:\/\/mirror.mva-n.net/g" $apt /mariadb.list
41+ fi
42+ fi
43+
44+ if [ -f " $apt /postgresql.list" ]; then
45+ if grep -q " http://apt.postgresql.org" $apt /postgresql.list; then
46+ echo " [ * ] PostgreSQL"
47+ sed -i " s/http\:\/\/apt.postgresql.org/https\:\/\/apt.postgresql.org/g" $apt /postgresql.list
48+ fi
49+ fi
You can’t perform that action at this time.
0 commit comments