kejilion/sh

將 2355 行的系統重裝,改用 OGOS 的版本

Rayfor000 opened this issue · 5 comments

位於 2355 行的系統重裝腳本建議改用
wget https://raw.ogtt.tk/shell/InstallNET.sh && chmod +x InstallNET.sh
此版本增加對 kejilion.sh 重裝後的內置

具體使用方式:
Usage:
./InstallNET.sh [OPTIONS]

Options:
-debian [712] Specify Debian distribution ('12' is the stable version)
-ubuntu [20.04/22.04/24.04] Specify Ubuntu distribution ('24.04' is the stable version)
-kali [rolling/dev] Specify Kali Linux distribution ('rolling' is the stable version)
-alpine [3.16
3.20] Specify Alpine Linux distribution ('edge' is the stable version)
-centos [7~9] Specify CentOS distribution ('9' is the stable version)
-rocky [8/9] Specify Rocky Linux distribution ('9' is the stable version)
-alma [8.10/9.4] Specify AlmaLinux distribution ('9.4' is the stable version)
-fedora [39/40] Specify Fedora Linux distribution ('40' is the stable version)
-windows [DIST] Specify Microsoft Windows distribution
-architecture [32/i386|64/amd64|arm/arm64]
--ip-addr [123.456.789.012] / --ip-mask [24-32] / --ip-gate [123.456.789.012]
--ip-set [123.456.789.012] [24-32] [123.456.789.1]
--ip6-addr [1234:5678:90ab:cdef:1234:5678:90ab:cdef] / --ip6-mask [1-128] / --ip6-gate [1234:5678:90ab:cdef:1234:5678:90ab:cdef]
--ip6-set [1234:5678:90ab:cdef:1234:5678:90ab:cdef] [1-128] [1234:5678:90ab:cdef:1234:5678:90ab:cdef]
--bbr Enable BBR congestion control algorithm
-mirror [URL]
-lang [LANG] Not for Linux, specify language for Windows
-dd/--image [URL]
-hostname [HOSTNAME]
-pwd [PASSWORD]
-port [SSH-PORT]

可以使用 ./InstallNET.sh -debian 12 --fail2ban --kejilion 中的 --kejilion,以重裝後安裝 kejilion.sh

这 怎么用啊 看不懂 哈哈

dd_xitong() {
		send_stats "重装系统"
		dd_xitong_MollyLau() {
			wget "${gh_proxy}https://raw.ogtt.tk/shell/InstallNET.sh" && chmod +x InstallNET.sh

		}

		dd_xitong_bin456789() {
			curl -O ${gh_proxy}https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
		}

		dd_xitong_1() {
		  echo -e "重装后初始用户名: ${gl_huang}root${gl_bai}  初始密码: ${gl_huang}OGOSpass${gl_bai}  初始端口: ${gl_huang}22${gl_bai}"
		  echo -e "按任意键继续..."
		  read -n 1 -s -r -p ""
		  install wget
		  dd_xitong_MollyLau
		}

		dd_xitong_2() {
		  echo -e "重装后初始用户名: ${gl_huang}Administrator${gl_bai}  初始密码: ${gl_huang}Teddysun.com${gl_bai}  初始端口: ${gl_huang}3389${gl_bai}"
		  echo -e "按任意键继续..."
		  read -n 1 -s -r -p ""
		  install wget
		  dd_xitong_MollyLau
		}

		dd_xitong_3() {
		  echo -e "重装后初始用户名: ${gl_huang}root${gl_bai}  初始密码: ${gl_huang}123@@@${gl_bai}  初始端口: ${gl_huang}22${gl_bai}"
		  echo -e "按任意键继续..."
		  read -n 1 -s -r -p ""
		  dd_xitong_bin456789
		}

		dd_xitong_4() {
		  echo -e "重装后初始用户名: ${gl_huang}Administrator${gl_bai}  初始密码: ${gl_huang}123@@@${gl_bai}  初始端口: ${gl_huang}3389${gl_bai}"
		  echo -e "按任意键继续..."
		  read -n 1 -s -r -p ""
		  dd_xitong_bin456789
		}

		  while true; do
			root_use
			echo "重装系统"
			echo "--------------------------------"
			echo -e "${gl_hong}注意: ${gl_bai}重装有风险失联,不放心者慎用。重装预计花费15分钟,请提前备份数据。"
			echo -e "${gl_hui}感谢MollyLau大佬和bin456789大佬的脚本支持!${gl_bai} "
			echo "------------------------"
			echo "1. Debian 12                  2. Debian 11"
			echo "3. Debian 10                  4. Debian 9"
			echo "------------------------"
			echo "11. Ubuntu 24.04              12. Ubuntu 22.04"
			echo "13. Ubuntu 20.04              14. Ubuntu 18.04"
			echo "------------------------"
			echo "21. Rocky Linux 9             22. Rocky Linux 8"
			echo "23. Alma Linux 9              24. Alma Linux 8"
			echo "25. oracle Linux 9            26. oracle Linux 8"
			echo "27. Fedora Linux 41           28. Fedora Linux 40"
			echo "29. CentOS 7"
			echo "------------------------"
			echo "31. Alpine Linux              32. Arch Linux"
			echo "33. Kali Linux                34. openEuler"
			echo "35. openSUSE Tumbleweed"
			echo "------------------------"
			echo "41. Windows 11                42. Windows 10"
			echo "43. Windows 7                 44. Windows Server 2022"
			echo "45. Windows Server 2019       46. Windows Server 2016"
			echo "------------------------"
			echo "0. 返回上一级选单"
			echo "------------------------"
			read -e -p "请选择要重装的系统: " sys_choice
			case "$sys_choice" in
			  1)
				send_stats "重装debian 12"
				dd_xitong_1
				bash InstallNET.sh -debian 12 --kejilion
				reboot
				exit
				;;
			  2)
				send_stats "重装debian 11"
				dd_xitong_1
				bash InstallNET.sh -debian 11 --kejilion
				reboot
				exit
				;;
			  3)
				send_stats "重装debian 10"
				dd_xitong_1
				bash InstallNET.sh -debian 10 --kejilion
				reboot
				exit
				;;
			  4)
				send_stats "重装debian 9"
				dd_xitong_1
				bash InstallNET.sh -debian 9 --kejilion
				reboot
				exit
				;;
			  11)
				send_stats "重装ubuntu 24.04"
				dd_xitong_1
				bash InstallNET.sh -ubuntu 24.04 --kejilion
				reboot
				exit
				;;
			  12)
				send_stats "重装ubuntu 22.04"
				dd_xitong_1
				bash InstallNET.sh -ubuntu 22.04 --kejilion
				reboot
				exit
				;;
			  13)
				send_stats "重装ubuntu 20.04"
				dd_xitong_1
				bash InstallNET.sh -ubuntu 20.04 --kejilion
				reboot
				exit
				;;
			  14)
				send_stats "重装ubuntu 18.04"
				dd_xitong_1
				bash InstallNET.sh -ubuntu 18.04 --kejilion
				reboot
				exit
				;;


			  21)
				send_stats "重装rockylinux9"
				dd_xitong_3
				bash reinstall.sh rocky
				reboot
				exit
				;;

			  22)
				send_stats "重装rockylinux8"
				dd_xitong_3
				bash reinstall.sh rocky 8
				reboot
				exit
				;;

			  23)
				send_stats "重装alma9"
				dd_xitong_3
				bash reinstall.sh alma
				reboot
				exit
				;;

			  24)
				send_stats "重装alma8"
				dd_xitong_3
				bash reinstall.sh alma 8
				reboot
				exit
				;;

			  25)
				send_stats "重装oracle9"
				dd_xitong_3
				bash reinstall.sh oracle
				reboot
				exit
				;;

			  26)
				send_stats "重装oracle8"
				dd_xitong_3
				bash reinstall.sh oracle 8
				reboot
				exit
				;;

			  27)
				send_stats "重装fedora41"
				dd_xitong_3
				bash reinstall.sh fedora
				reboot
				exit
				;;

			  28)
				send_stats "重装fedora40"
				dd_xitong_3
				bash reinstall.sh fedora 40
				reboot
				exit
				;;

			  29)
				send_stats "重装centos 7"
				dd_xitong_1
				bash InstallNET.sh -centos 7 --kejilion
				reboot
				exit
				;;

			  31)
				send_stats "重装alpine"
				dd_xitong_1
				bash InstallNET.sh -alpine edge --kejilion
				reboot
				exit
				;;

			  32)
				send_stats "重装arch"
				dd_xitong_3
				bash reinstall.sh arch
				reboot
				exit
				;;

			  33)
				send_stats "重装kali"
				dd_xitong_3
				bash reinstall.sh kali
				reboot
				exit
				;;

			  34)
				send_stats "重装openeuler"
				dd_xitong_3
				bash reinstall.sh openeuler
				reboot
				exit
				;;

			  35)
				send_stats "重装opensuse"
				dd_xitong_3
				bash reinstall.sh opensuse
				reboot
				exit
				;;

			  41)
				send_stats "重装windows11"
				dd_xitong_2
				bash InstallNET.sh -windows 11 -lang "cn"
				reboot
				exit
				;;
			  42)
				dd_xitong_2
				send_stats "重装windows10"
				bash InstallNET.sh -windows 10 -lang "cn"
				reboot
				exit
				;;
			  43)
				send_stats "重装windows7"
				dd_xitong_4
				URL="https://massgrave.dev/windows_7_links"
				web_content=$(wget -q -O - "$URL")
				iso_link=$(echo "$web_content" | grep -oP '(?<=href=")[^"]*cn[^"]*windows_7[^"]*professional[^"]*x64[^"]*\.iso')
				# bash reinstall.sh windows --image-name 'Windows 7 Professional' --lang zh-cn
				# bash reinstall.sh windows --iso='$iso_link' --image-name='Windows 7 PROFESSIONAL'
				bash reinstall.sh windows --iso="$iso_link" --image-name='Windows 7 PROFESSIONAL'
				reboot
				exit
				;;
			  44)
				send_stats "重装windows server 22"
				dd_xitong_4
				URL="https://massgrave.dev/windows_server_links"
				web_content=$(wget -q -O - "$URL")
				iso_link=$(echo "$web_content" | grep -oP '(?<=href=")[^"]*cn[^"]*windows_server[^"]*2022[^"]*x64[^"]*\.iso')
				bash reinstall.sh windows --iso="$iso_link" --image-name='Windows Server 2022 SERVERDATACENTER'
				reboot
				exit
				;;
			  45)
				send_stats "重装windows server 19"
				dd_xitong_2
				bash InstallNET.sh -windows 2019 -lang "cn"
				reboot
				exit
				;;
			  46)
				send_stats "重装windows server 16"
				dd_xitong_2
				bash InstallNET.sh -windows 2016 -lang "cn"
				reboot
				exit
				;;
			  0)
				break
				;;
			  *)
				echo "无效的选择,请重新输入。"
				break
				;;
			esac
		  done
}

这 怎么用啊 看不懂 哈哈

已回覆

直接在后面加--kejilion?

直接在后面加--kejilion?

wget https://raw.ogtt.tk/shell/InstallNET.sh && chmod +x InstallNET.sh
./InstallNET.sh -debian 12 --kejilion
即可
它會判斷是否存在 '--kejilion' 如果存在,則會在重裝後的系統中安裝 kejilion.sh,不會安裝 /root/kejilion.sh,是直接下載到 /usr/local/bin/k 中