Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
bin /
cron /
Delete
Unzip
Name
Size
Permission
Date
Action
a2cop.sh
5.28
KB
-rwxr-xr-x
2023-07-05 13:07
a2cop.sh.bak
5.22
KB
-rwxr-xr-x
2023-07-05 13:07
apache_up.sh
199
B
-rwxr-xr-x
2022-10-27 11:41
auto_fsck_off
81
B
-rwxr-xr-x
2022-10-27 11:41
backup_storage_config.sh
1.53
KB
-rwxr-xr-x
2022-08-15 03:10
cdns_check.sh
1.39
KB
-rwxr-xr-x
2022-10-27 11:41
check_autossl_domains.py
4.58
KB
-rwxr-xr-x
2023-07-04 02:48
check_autossl_excluded.sh
6.88
KB
-rwxr-xr-x
2023-05-22 11:59
check_clnrepos.sh
1.33
KB
-rwxr-xr-x
2024-10-14 15:57
check_rpmdb.sh
670
B
-rwxr-xr-x
2024-06-20 10:20
clean_authorized_keys.sh
2.24
KB
-rwxr-xr-x
2025-09-25 05:08
clean_htdocs.sh
1.13
KB
-rwxr-xr-x
2022-10-27 11:41
clean_temp.sh
301
B
-rwxr-xr-x
2022-10-27 11:41
cleanup-modsec-logs.sh
269
B
-rwxr-xr-x
2022-10-27 11:41
cpanel-config.sh
4.54
KB
-rwxr-xr-x
2025-01-10 04:36
cpanel.config.template
8.87
KB
-rwxr-xr-x
2025-01-09 03:02
cron_frequency.sh
145
B
-rwxr-xr-x
2022-10-27 11:41
dbgovernor_check.sh
92
B
-rwxr-xr-x
2022-10-27 11:41
disable_cpupdate_mdedi.sh
658
B
-rwx------
2024-02-06 02:56
enable_process_accounting.sh
130
B
-rwxr-xr-x
2022-10-27 11:41
fsck_no.sh
209
B
-rwxr-xr-x
2022-10-27 11:41
grubinst7.sh
1.43
KB
-rwxr-xr-x
2024-12-16 13:25
io_nice.sh
125
B
-rwxr-xr-x
2022-10-27 11:41
kill_php.sh
1.57
KB
-rwxr-xr-x
2022-10-27 11:41
litespeed_mailer.sh
2.18
KB
-rwxr-x---
2024-05-14 05:54
lsup_wrap.sh
2.72
KB
-rwx------
2024-09-19 15:53
mailperm_random.sh
117
B
-rwxr-xr-x
2022-10-27 11:41
mdedi_disk_monitoring.sh
6.76
KB
-rwx------
2024-04-18 04:49
mysql_dumpdbs_all.sh
5.81
KB
-rwxr-xr-x
2023-04-18 13:21
patchman-check.sh
106
B
-rwxr-xr-x
2022-10-27 11:41
php_handler_fix.sh
571
B
-rwxr-xr-x
2023-12-06 02:25
pull_disk_locator.sh
813
B
-rwxr-xr-x
2022-10-27 15:28
ramcheck.py
2.75
KB
-rwxr-xr-x
2023-03-21 12:53
randomize_litespeed_server_admin_password.sh
935
B
-rwxr-xr-x
2023-04-24 13:27
randomize_root_password.sh
265
B
-rwxr-xr-x
2022-10-27 11:41
randomize_sqlroot_password.sh
2.1
KB
-rwxr-xr-x
2023-06-19 01:28
referee
2.52
KB
-rwxr-xr-x
2022-10-27 11:41
salt_deployment_cleaner.sh
637
B
-rwxr-xr-x
2023-03-06 04:07
salt_minion_restart.sh
1.68
KB
-rwxr-xr-x
2022-12-19 04:12
upcp-major-at-scheduler.sh
621
B
-rwxr-xr-x
2022-09-29 15:30
upcp-major.sh
2.33
KB
-rwxr-xr-x
2022-10-12 13:41
update_localdomains.sh
60
B
-rwxr-xr-x
2022-10-27 11:41
updatecfips.sh
1.62
KB
-rwxr-xr-x
2023-05-22 11:59
Save
Rename
#!/bin/bash # This script will set the cpanel.config features using whmapi1 and force the ones that # can't. From https://jira.a2hosting.com/browse/SYSENG-4235 # Additionally, it will also check for new features in cPanel CURRENT, RELEASE and EDGE # and will notify to @syseng to decide how to implement them (if any) # can we do a better logging? logger "Starting A2 cpanel-config" # cPanel's config template & variables tpl='/opt/bin/cron/cpanel.config.template' ccf='/var/cpanel/cpanel.config' # Notification's settings semail='sysadmin@a2hosting.com' fnotify='/opt/includes/.cpanel-config.notify' tempnf='/tmp/.cpanel-config.tmp' # server's hosts that run cPanel EDGE, RELEASE, CURRENT devsrv='az1-ss97,az1-ss98,az1-ss99,az1-ss100' ourhost=$(/bin/hostname -s) # obsolete features that need to be ignored to avoid confusion obsolete='VALIASDIR,cgiemaildisabled,disable_eximstats_delayed_insert,disablexfercpanel,enable_owner_password_override,errorstostdout,lve_enablepythonapp,lve_enablerubyapp,lve_showinodeusage,minpwstrength_ftp,minpwstrength_pop,minpwstrength_virtual,rollback,skipurchin,use_safe_quotas,xsrftokens,horde_cache_empty_days,ignoredepreciated,php_system_default_version,send_server_configuration,send_server_usage,skiphorde,horde_cache_empty_days,htaccess_check_recurse,ignoredepreciated,php_system_default_version,send_server_configuration,send_server_usageskiphorde' # create an array for each line of the config file that is not a comment or empty line readarray -t cpaneltemplate < <(cat $tpl | grep -v '^\#' | grep -v -e '^[[:space:]]*$') # function to execute whampi1 whmapi_exec() { res=`/usr/local/cpanel/bin/whmapi1 --output=json set_tweaksetting key="\$1" value="\$2"`; echo $res } # function that will return a list of new features or empty if none # this function should be called only if server is in $devsrv # new: will check if the feature is not obsolete too and ignore it # new: SYSENG-12608 will save features to a tmp file and compare with a cached one # if there is a difference or no cache, it will notify. check_new_features() { # truncating temporary file and touch cache cat /dev/null > $tempnf touch $fnotify grep -v '^\#' $ccf | grep -v -e '^[[:space:]]*$' | while read feature; do ff=$(echo $feature | cut -d '=' -f1); if [[ $(grep -c $ff $tpl) -eq 0 && $(echo $obsolete | grep -c $ff) -eq 0 ]]; then echo $ff >> $tempnf fi; done; # if notify file does not exist or there is a difference, recreate the cache and print contents diff=$(/bin/diff $fnotify $tempnf); if [[ "$diff" != "" ]]; then logger "New features added, notify SysEng" cat /tmp/.cpanel-config.tmp > $fnotify cat $fnotify fi } # check if there is a custom cpanel.config, if there is, remove any templates and crons if [[ -e "/etc/a2_custom_cpanelconfig" ]]; then rm -f $tpl rm -f /etc/cron.d/cpanel_tweaks rm -f $0 logger "This server has a custom cpanel.config, exiting" exit fi # check for new features on server that are not on our template and notify # if $nfeature returns empty, it won't notify nfeature=$(check_new_features); if [[ ! -z $nfeature && $(echo $devsrv | grep -wc $ourhost) -gt 0 ]]; then # before we notify, make sure we have not done it yet to avoid spamming every day echo "The following features have been added: ${nfeature}" | /bin/mail -s "New cPanel feature on $ourhost" -r root@${ourhost} $semail fi # looping each element of the array logger "Looping through cPanel settings/tweaks" for cpline in "${cpaneltemplate[@]}"; do # creating a new array by splitting the line IFS='=' read -r -a cpt <<< $cpline # if full line is found in local config, we're good, continue if [[ $(grep "$cpline" $ccf) != "" ]]; then continue fi # set value to 0 if empty if [[ -z "${cpt[1]}" ]]; then cpt[1]="0" # if local feature has no value and our value is 0, we skip it grep -q "^${cpt[0]}$" $ccf && logger "Skipping ${cpt[0]}" && continue fi # set the feature through whmapi1 res=$(whmapi_exec "${cpt[0]}" "${cpt[1]}" | jq -r '.metadata.reason') logger "Setting ${cpt[0]} = ${cpt[1]} => $res" # if it can't be set using whmapi1, use the force and add it manually if [[ $res == "Invalid tweaksetting key" ]]; then logger "Adding ${cpt[0]} = ${cpt[1]} manually.." sed -i "/^${cpt[0]}=/d" $ccf && echo "${cpt[0]}=${cpt[1]}" >> $ccf fi # we need to sleep for a bit to prevent cPanel from locking up [[ $res == "OK" ]] && sleep 0.5 done logger "End of A2 cpanel-config"