Add Oracle Linux 9
This commit is contained in:
parent
6ca52bf0e0
commit
200da23776
@ -88,9 +88,6 @@ check_os() {
|
|||||||
elif grep -qs "release 9" "$rh_file"; then
|
elif grep -qs "release 9" "$rh_file"; then
|
||||||
os_ver=9
|
os_ver=9
|
||||||
grep -qi stream "$rh_file" && os_ver=9s
|
grep -qi stream "$rh_file" && os_ver=9s
|
||||||
if [ "$os_type" = "ol" ]; then
|
|
||||||
exiterr "Oracle Linux 9 is not supported."
|
|
||||||
fi
|
|
||||||
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
|
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
|
||||||
os_type=amzn
|
os_type=amzn
|
||||||
os_ver=2
|
os_ver=2
|
||||||
|
@ -88,9 +88,6 @@ check_os() {
|
|||||||
elif grep -qs "release 9" "$rh_file"; then
|
elif grep -qs "release 9" "$rh_file"; then
|
||||||
os_ver=9
|
os_ver=9
|
||||||
grep -qi stream "$rh_file" && os_ver=9s
|
grep -qi stream "$rh_file" && os_ver=9s
|
||||||
if [ "$os_type" = "ol" ]; then
|
|
||||||
exiterr "Oracle Linux 9 is not supported."
|
|
||||||
fi
|
|
||||||
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
|
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
|
||||||
os_type=amzn
|
os_type=amzn
|
||||||
os_ver=2
|
os_ver=2
|
||||||
|
@ -93,9 +93,6 @@ check_os() {
|
|||||||
elif grep -qs "release 9" "$rh_file"; then
|
elif grep -qs "release 9" "$rh_file"; then
|
||||||
os_ver=9
|
os_ver=9
|
||||||
grep -qi stream "$rh_file" && os_ver=9s
|
grep -qi stream "$rh_file" && os_ver=9s
|
||||||
if [ "$os_type" = "ol" ]; then
|
|
||||||
exiterr "Oracle Linux 9 is not supported."
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
cat 1>&2 <<'EOF'
|
cat 1>&2 <<'EOF'
|
||||||
Error: This script only supports one of the following OS:
|
Error: This script only supports one of the following OS:
|
||||||
@ -629,7 +626,9 @@ apply_gcp_mtu_fix() {
|
|||||||
enable_on_boot() {
|
enable_on_boot() {
|
||||||
bigecho "Enabling services on boot..."
|
bigecho "Enabling services on boot..."
|
||||||
systemctl --now mask firewalld 2>/dev/null
|
systemctl --now mask firewalld 2>/dev/null
|
||||||
if [ "$use_nft" = "1" ]; then
|
if [ "$os_type$os_ver" = "ol9" ]; then
|
||||||
|
systemctl enable nftables 2>/dev/null
|
||||||
|
elif [ "$use_nft" = "1" ]; then
|
||||||
systemctl enable nftables fail2ban 2>/dev/null
|
systemctl enable nftables fail2ban 2>/dev/null
|
||||||
else
|
else
|
||||||
systemctl enable iptables fail2ban 2>/dev/null
|
systemctl enable iptables fail2ban 2>/dev/null
|
||||||
@ -743,12 +742,16 @@ vpnsetup() {
|
|||||||
install_vpn_pkgs_1
|
install_vpn_pkgs_1
|
||||||
install_vpn_pkgs_2
|
install_vpn_pkgs_2
|
||||||
install_vpn_pkgs_3
|
install_vpn_pkgs_3
|
||||||
install_fail2ban
|
if [ "$os_type$os_ver" != "ol9" ]; then
|
||||||
|
install_fail2ban
|
||||||
|
fi
|
||||||
get_helper_scripts
|
get_helper_scripts
|
||||||
get_libreswan
|
get_libreswan
|
||||||
install_libreswan
|
install_libreswan
|
||||||
create_vpn_config
|
create_vpn_config
|
||||||
create_f2b_config
|
if [ "$os_type$os_ver" != "ol9" ]; then
|
||||||
|
create_f2b_config
|
||||||
|
fi
|
||||||
update_sysctl
|
update_sysctl
|
||||||
update_iptables
|
update_iptables
|
||||||
apply_gcp_mtu_fix
|
apply_gcp_mtu_fix
|
||||||
|
Loading…
Reference in New Issue
Block a user