From f70e4c26b4f6c20af011e5776a6d0262772e9963 Mon Sep 17 00:00:00 2001 From: Scott Claeys Date: Fri, 11 Aug 2023 07:46:40 -0500 Subject: [PATCH 1/3] Update autoinstall.php Updated with exhaustive list of Operating Systems configurable options, "iso" custom fields drop-down so that these values will auto-populate when installed to new server Co-Authored-By: Rad Web Hosting <16030710+radwebhosting@users.noreply.github.com> Co-Authored-By: Scott Claeys <17863337+sclaeys@users.noreply.github.com> --- .../servers/virtualizor_cloud/autoinstall.php | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/whmcs/modules/servers/virtualizor_cloud/autoinstall.php b/whmcs/modules/servers/virtualizor_cloud/autoinstall.php index b6bb30b..ad29a69 100644 --- a/whmcs/modules/servers/virtualizor_cloud/autoinstall.php +++ b/whmcs/modules/servers/virtualizor_cloud/autoinstall.php @@ -27,8 +27,9 @@ function virtualizor_cloud_installpredefined() ]); $list = [ 'almalinux-8.4-x86_64|AlmaLinux 8 (64 bit)', - 'almalinux-9.0-x86_64|AlmaLinux 9 (64 bit)', + 'almalinux-9.2-x86_64|AlmaLinux 9 (64 bit)', 'oracle-8.6-x86_64|Oracle Linux 8 (64 bit)', + 'oracle-9.2-x86_64|Oracle Linux 8 (64 bit)', 'rocky-8.4-x86_64|Rocky Linux 8 (64 bit)', 'rocky-9.1-x86_64|Rocky Linux 9 (64 bit)', 'centos-7.8-x86_64|CentOS 7 (64 bit)', @@ -36,13 +37,20 @@ function virtualizor_cloud_installpredefined() 'debian-9.4-x86_64|Debian 9 (64 bit)', 'debian-10-x86_64|Debian 10 (64 bit)', 'debian-11-x86_64|Debian 11 (64 bit)', + 'debian-12-x86_64|Debian 11 (64 bit)', 'fedora-34-x86_64|Fedora 34 (64 bit)', 'scientific-7.4-x86_64|Scientific Linux 7.4 (64 bit)', 'suse-15.1-x86_64|openSUSE 15.1 (64 bit)', 'ubuntu-18.04-x86_64|Ubuntu 18.04 (64 bit)', 'ubuntu-20.04-x86_64|Ubuntu 20.04 (64 bit)', 'ubuntu-22.04-x86_64|Ubuntu 22.04 (64 bit)', - 'cyberpanel-centos7-x86_64|CyberPanel (64 bit)', + 'cyberpanel-centos7-x86_64|CyberPanel (64 bit) (10GB+ Disk)', + 'azuracast-20.04-lts-x86_64|AzuraCast on Focal (64 bit) (10GB+ Disk)', + 'windows-2008r2|Windows Server 2008 R2 EVAL (15GB+ Disk)', + 'windows-2012r2|Windows Server 2012 R2 EVAL (15GB+ Disk)', + 'windows-2016|Windows Server 2016 EVAL (20GB+ Disk)', + 'windows-2019|Windows Server 2019 EVAL (20GB+ Disk)', + 'windows-2022|Windows Server 2022 EVAL (20GB+ Disk)', ]; $currenciesarray = Capsule::table('tblcurrencies')->pluck('code', 'id'); if (!is_array($currenciesarray)) { @@ -125,6 +133,20 @@ function virtualizor_cloud_installpredefined() "showorder" => 0, "showinvoice" => 0, "sortorder" => 0 + ]); + Capsule::table('tblcustomfields')->insert([ + "type" => "product", + "relid" => $newProduct->id, + "fieldname" => 'iso|ISO Disk', + "fieldtype" => 'dropdown', + "description" => 'Attach ISO disk image', + "fieldoptions" => 'none,3cx-debian-amd64-netinst.iso,AlmaLinux-9.2-x86_64-minimal.iso,alpine-standard-3.16.0-x86_64.iso,antiX-22-net_x64-net.iso,archlinux-2022.07.01-x86_64.iso,artixlinux-base-suite66-20220713-x86_64.iso,astlinux-1.4.7-genx86_64-vm.iso,astralinux-alce-2.12.46.6-17.04.2023_15.09.iso,CentOS-7-x86_64-Minimal-2009.iso,CentOS-7-x86_64-NetInstall-2009.iso,CentOS-Stream-8-x86_64-20221005-boot.iso,CentOS-Stream-9-20230704.1-x86_64-boot.iso,chimera-linux-x86_64-LIVE-20221012-base.iso,ClearOS-DVD-x86_64-7.9.1.342252.iso,clonezilla-live-3.0.1-8-amd64.iso,CloudLinux-DVD-x86_64-7.9.iso,CloudLinux-netinst-x86_64-7.9.iso,coreos-36.20221001.3.0-live.x86_64.iso,debian-10.3.0-amd64-DVD-1.iso,debian-9.4.0-amd64-netinst.iso,debian-amd64-netinst-elastix.iso,debian-live-11.5.0-amd64-standard.iso,debian-live-11.6.0-amd64-xfce.iso,elementary-os-7.0-stable.20230129rc.iso,Fedora-Server-netinst-x86_64-36-1.5.iso,Fedora-Server-netinst-x86_64-38-1.6.iso,FreeBSD-12.3-RELEASE-amd64-dvd1.iso,FreeBSD-13.0-RELEASE-amd64-dvd1.iso,FreeNAS-11.0-RELEASE.iso,FREEPBX-16-64bit-2208-2-unattended.iso,gentoo-install-amd64-minimal-20220626T170536Z.iso,GoboLinux-017-x86_64.iso,gparted-live-1.0.0-5-amd64.iso,HBCD_PE_x64.iso,ipxe.iso,linuxmint-20.2-cinnamon-64bit.iso,Mageia-8-x86_64.iso,manjaro-kde-21.3.7-minimal-220816-linux515.iso,mikrotik-6.48.6.iso,mikrotik-7.5.iso,mikrotik-7.6rc3.iso,mxlinux-21.2.1_x64.iso,netboot.xyz.iso,netbsd-9-x86_64-boot.iso,nethserver-7.9.2009-x86_64.iso,nixos-minimal-x86_64-linux.iso,openbsd-amd64-install71.iso,openfileresa-2.99.1-x86_64-disc1.iso,OpenMandrivaLx.4.3-plasma.x86_64.iso,Parrot-security-5.3_amd64.iso,pfSense-CE-2.6.0-RELEASE-amd64.iso,pfSense-CE-2.7.0-RELEASE-amd64.iso,pop-os_22.04_amd64_intel_32.iso,puppylinux-fossapup64-9.5.iso,slackware64-15.0-install-dvd.iso,smeserver-10.1-x86_64-netinstall.iso,SNG7-PBX-64bit-2203-2.iso,sparkylinux-7.0-x86_64-minimalcli.iso,systemrescue-9.04-amd64.iso,TrueNAS-13.0-U2.iso,turnkey-mongodb-16.1-buster-amd64.iso,turnkey-nodejs-16.1-buster-amd64.iso,turnkey-redis-16.3-buster-amd64.iso,ubcd539.iso,ubuntu-16.04.4-server-amd64.iso,venomlinux-4.0-x86_64-20220912.iso,ViciBox_v10.x86_64-10.0.2.iso,virtio-win.iso,voidlinux-live-x86_64-20221001-base.iso,vyos-rolling-latest.iso,Windows_10_20H2_English_x32.iso,Windows_10_21H1_X86-64.iso,Windows_2012-R2_SERVER_EVAL_EN-US.ISO,Windows_2019_SERVER_EVAL_x64.iso,Windows_2022_SERVER_EVAL_x64.iso,zentyal-7.0-development-amd64.iso,Zorin-OS-16.2-Core-64-bit-r1.iso', + "regexpr" => '', + "adminonly" => '', + "required" => 0, + "showorder" => 1, + "showinvoice" => 1, + "sortorder" => 0 ]); \WHMCS\Config\Setting::setValue('virtualizor_cloud_installed', '1'); return ''; From 9d4db9fcb2d9b6918755e11eb262740458b7adf4 Mon Sep 17 00:00:00 2001 From: Scott Claeys Date: Fri, 11 Aug 2023 08:42:28 -0500 Subject: [PATCH 2/3] Update .gitignore Adding automatically created .bak changelog files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a67d42b..d53902d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.phar # Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file # composer.lock +whmcs/modules/servers/virtualizor_cloud/autoinstall.php.bak From af27ee4a0f387200a5d27a2670fe6064a033e39e Mon Sep 17 00:00:00 2001 From: Scott Claeys Date: Fri, 11 Aug 2023 08:46:44 -0500 Subject: [PATCH 3/3] Update autoinstall.php Added OPNsense ISO media --- whmcs/modules/servers/virtualizor_cloud/autoinstall.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whmcs/modules/servers/virtualizor_cloud/autoinstall.php b/whmcs/modules/servers/virtualizor_cloud/autoinstall.php index ad29a69..1a878d9 100644 --- a/whmcs/modules/servers/virtualizor_cloud/autoinstall.php +++ b/whmcs/modules/servers/virtualizor_cloud/autoinstall.php @@ -140,7 +140,7 @@ function virtualizor_cloud_installpredefined() "fieldname" => 'iso|ISO Disk', "fieldtype" => 'dropdown', "description" => 'Attach ISO disk image', - "fieldoptions" => 'none,3cx-debian-amd64-netinst.iso,AlmaLinux-9.2-x86_64-minimal.iso,alpine-standard-3.16.0-x86_64.iso,antiX-22-net_x64-net.iso,archlinux-2022.07.01-x86_64.iso,artixlinux-base-suite66-20220713-x86_64.iso,astlinux-1.4.7-genx86_64-vm.iso,astralinux-alce-2.12.46.6-17.04.2023_15.09.iso,CentOS-7-x86_64-Minimal-2009.iso,CentOS-7-x86_64-NetInstall-2009.iso,CentOS-Stream-8-x86_64-20221005-boot.iso,CentOS-Stream-9-20230704.1-x86_64-boot.iso,chimera-linux-x86_64-LIVE-20221012-base.iso,ClearOS-DVD-x86_64-7.9.1.342252.iso,clonezilla-live-3.0.1-8-amd64.iso,CloudLinux-DVD-x86_64-7.9.iso,CloudLinux-netinst-x86_64-7.9.iso,coreos-36.20221001.3.0-live.x86_64.iso,debian-10.3.0-amd64-DVD-1.iso,debian-9.4.0-amd64-netinst.iso,debian-amd64-netinst-elastix.iso,debian-live-11.5.0-amd64-standard.iso,debian-live-11.6.0-amd64-xfce.iso,elementary-os-7.0-stable.20230129rc.iso,Fedora-Server-netinst-x86_64-36-1.5.iso,Fedora-Server-netinst-x86_64-38-1.6.iso,FreeBSD-12.3-RELEASE-amd64-dvd1.iso,FreeBSD-13.0-RELEASE-amd64-dvd1.iso,FreeNAS-11.0-RELEASE.iso,FREEPBX-16-64bit-2208-2-unattended.iso,gentoo-install-amd64-minimal-20220626T170536Z.iso,GoboLinux-017-x86_64.iso,gparted-live-1.0.0-5-amd64.iso,HBCD_PE_x64.iso,ipxe.iso,linuxmint-20.2-cinnamon-64bit.iso,Mageia-8-x86_64.iso,manjaro-kde-21.3.7-minimal-220816-linux515.iso,mikrotik-6.48.6.iso,mikrotik-7.5.iso,mikrotik-7.6rc3.iso,mxlinux-21.2.1_x64.iso,netboot.xyz.iso,netbsd-9-x86_64-boot.iso,nethserver-7.9.2009-x86_64.iso,nixos-minimal-x86_64-linux.iso,openbsd-amd64-install71.iso,openfileresa-2.99.1-x86_64-disc1.iso,OpenMandrivaLx.4.3-plasma.x86_64.iso,Parrot-security-5.3_amd64.iso,pfSense-CE-2.6.0-RELEASE-amd64.iso,pfSense-CE-2.7.0-RELEASE-amd64.iso,pop-os_22.04_amd64_intel_32.iso,puppylinux-fossapup64-9.5.iso,slackware64-15.0-install-dvd.iso,smeserver-10.1-x86_64-netinstall.iso,SNG7-PBX-64bit-2203-2.iso,sparkylinux-7.0-x86_64-minimalcli.iso,systemrescue-9.04-amd64.iso,TrueNAS-13.0-U2.iso,turnkey-mongodb-16.1-buster-amd64.iso,turnkey-nodejs-16.1-buster-amd64.iso,turnkey-redis-16.3-buster-amd64.iso,ubcd539.iso,ubuntu-16.04.4-server-amd64.iso,venomlinux-4.0-x86_64-20220912.iso,ViciBox_v10.x86_64-10.0.2.iso,virtio-win.iso,voidlinux-live-x86_64-20221001-base.iso,vyos-rolling-latest.iso,Windows_10_20H2_English_x32.iso,Windows_10_21H1_X86-64.iso,Windows_2012-R2_SERVER_EVAL_EN-US.ISO,Windows_2019_SERVER_EVAL_x64.iso,Windows_2022_SERVER_EVAL_x64.iso,zentyal-7.0-development-amd64.iso,Zorin-OS-16.2-Core-64-bit-r1.iso', + "fieldoptions" => 'none,3cx-debian-amd64-netinst.iso,AlmaLinux-9.2-x86_64-minimal.iso,alpine-standard-3.16.0-x86_64.iso,antiX-22-net_x64-net.iso,archlinux-2022.07.01-x86_64.iso,artixlinux-base-suite66-20220713-x86_64.iso,astlinux-1.4.7-genx86_64-vm.iso,astralinux-alce-2.12.46.6-17.04.2023_15.09.iso,CentOS-7-x86_64-Minimal-2009.iso,CentOS-7-x86_64-NetInstall-2009.iso,CentOS-Stream-8-x86_64-20221005-boot.iso,CentOS-Stream-9-20230704.1-x86_64-boot.iso,chimera-linux-x86_64-LIVE-20221012-base.iso,ClearOS-DVD-x86_64-7.9.1.342252.iso,clonezilla-live-3.0.1-8-amd64.iso,CloudLinux-DVD-x86_64-7.9.iso,CloudLinux-netinst-x86_64-7.9.iso,coreos-36.20221001.3.0-live.x86_64.iso,debian-10.3.0-amd64-DVD-1.iso,debian-9.4.0-amd64-netinst.iso,debian-amd64-netinst-elastix.iso,debian-live-11.5.0-amd64-standard.iso,debian-live-11.6.0-amd64-xfce.iso,elementary-os-7.0-stable.20230129rc.iso,Fedora-Server-netinst-x86_64-36-1.5.iso,Fedora-Server-netinst-x86_64-38-1.6.iso,FreeBSD-12.3-RELEASE-amd64-dvd1.iso,FreeBSD-13.0-RELEASE-amd64-dvd1.iso,FreeNAS-11.0-RELEASE.iso,FREEPBX-16-64bit-2208-2-unattended.iso,gentoo-install-amd64-minimal-20220626T170536Z.iso,GoboLinux-017-x86_64.iso,gparted-live-1.0.0-5-amd64.iso,HBCD_PE_x64.iso,ipxe.iso,linuxmint-20.2-cinnamon-64bit.iso,Mageia-8-x86_64.iso,manjaro-kde-21.3.7-minimal-220816-linux515.iso,mikrotik-6.48.6.iso,mikrotik-7.5.iso,mikrotik-7.6rc3.iso,mxlinux-21.2.1_x64.iso,netboot.xyz.iso,netbsd-9-x86_64-boot.iso,nethserver-7.9.2009-x86_64.iso,nixos-minimal-x86_64-linux.iso,openbsd-amd64-install71.iso,openfileresa-2.99.1-x86_64-disc1.iso,OpenMandrivaLx.4.3-plasma.x86_64.iso,OPNsense-23.7-dvd-amd64.iso,Parrot-security-5.3_amd64.iso,pfSense-CE-2.6.0-RELEASE-amd64.iso,pfSense-CE-2.7.0-RELEASE-amd64.iso,pop-os_22.04_amd64_intel_32.iso,puppylinux-fossapup64-9.5.iso,slackware64-15.0-install-dvd.iso,smeserver-10.1-x86_64-netinstall.iso,SNG7-PBX-64bit-2203-2.iso,sparkylinux-7.0-x86_64-minimalcli.iso,systemrescue-9.04-amd64.iso,TrueNAS-13.0-U2.iso,turnkey-mongodb-16.1-buster-amd64.iso,turnkey-nodejs-16.1-buster-amd64.iso,turnkey-redis-16.3-buster-amd64.iso,ubcd539.iso,ubuntu-16.04.4-server-amd64.iso,venomlinux-4.0-x86_64-20220912.iso,ViciBox_v10.x86_64-10.0.2.iso,virtio-win.iso,voidlinux-live-x86_64-20221001-base.iso,vyos-rolling-latest.iso,Windows_10_20H2_English_x32.iso,Windows_10_21H1_X86-64.iso,Windows_2012-R2_SERVER_EVAL_EN-US.ISO,Windows_2019_SERVER_EVAL_x64.iso,Windows_2022_SERVER_EVAL_x64.iso,zentyal-7.0-development-amd64.iso,Zorin-OS-16.2-Core-64-bit-r1.iso', "regexpr" => '', "adminonly" => '', "required" => 0,