cloudron-support: add --disable-ipv6
This commit is contained in:
@@ -26,6 +26,7 @@ readonly HELP_MESSAGE="
|
||||
--check-db-migrations Checks if the DB migrations are up to date
|
||||
--check-services Checks if services/addons are running and healthy.
|
||||
--disable-dnssec Disable DNSSEC
|
||||
--disable-ipv6 Disable IPv6. Use --reenable-ipv6 to re-enable.
|
||||
--enable-remote-support Enable SSH Remote Access for the Cloudron support team
|
||||
--disable-remote-support Disable SSH Remote Access for the Cloudron support team
|
||||
--fix-docker-version Ensures the correct docker version is installed
|
||||
@@ -887,9 +888,23 @@ function check_services() {
|
||||
done
|
||||
}
|
||||
|
||||
disable_ipv6_persistent() {
|
||||
cat > /etc/sysctl.d/99-disable-ipv6.conf <<'EOF'
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
EOF
|
||||
sysctl --system
|
||||
}
|
||||
|
||||
reenable_ipv6() {
|
||||
rm -f /etc/sysctl.d/99-disable-ipv6.conf
|
||||
sysctl --system
|
||||
}
|
||||
|
||||
check_disk_space
|
||||
|
||||
args=$(getopt -o "" -l "admin-login,disable-dnssec,enable-remote-support,disable-remote-support,help,owner-login,recreate-containers,recreate-docker,fix-docker-version,send-diagnostics,unbound-forward-dns:,troubleshoot,check-db-migrations,apply-db-migrations,check-services" -n "$0" -- "$@")
|
||||
args=$(getopt -o "" -l "admin-login,disable-dnssec,enable-remote-support,disable-remote-support,help,owner-login,recreate-containers,recreate-docker,fix-docker-version,send-diagnostics,unbound-forward-dns:,troubleshoot,check-db-migrations,apply-db-migrations,check-services,disable-ipv6,reenable-ipv6" -n "$0" -- "$@")
|
||||
eval set -- "${args}"
|
||||
|
||||
while true; do
|
||||
@@ -913,6 +928,8 @@ while true; do
|
||||
--check-db-migrations) check_db_migrations; exit 0;;
|
||||
--apply-db-migrations) apply_db_migrations; exit 0;;
|
||||
--check-services) check_services; exit 0;;
|
||||
--disable-ipv6) disable_ipv6_persistent; exit 0;;
|
||||
--reenable-ipv6) reenable_ipv6_persistent; exit 0;;
|
||||
--help) break;;
|
||||
--) break;;
|
||||
*) echo "Unknown option $1"; exit 1;;
|
||||
|
||||
Reference in New Issue
Block a user