Author Topic: CWP update script  (Read 2731 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP update script
« on: August 28, 2023, 06:17:21 PM »
I see that the CWP update script runs daily, thats OK i think,. but at the end it restarts Apache webserver, i i really do not get why, this also restarts my PHP cache and several other services, is this possible to turn off?

Offline
*****
Re: CWP update script
« Reply #1 on: August 29, 2023, 12:58:14 AM »
If you really want to exit the script at any point (before it restarts Apache), simply insert
Code: [Select]
exit 0into the script at the desired point. Future CWP updates would likely overwrite the script, so you would make the script immutable:
Code: [Select]
chattr +i /scripts/update_cwp

Offline
*
Re: CWP update script
« Reply #2 on: August 29, 2023, 08:03:32 AM »
That file is manglede by the cwp team so i cannot edit it.

Offline
*
Re: CWP update script
« Reply #3 on: August 30, 2023, 07:48:37 PM »
This is the content of the
Code: [Select]
/scripts/update_cwp file:
Code: [Select]
/usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
Opening the
Code: [Select]
cron.php file looks like this:

Code: [Select]
<?php //0042b
// Copyright CentOS WebPanel, Decoding is FORBIDDEN
// All Rights Reserved. www.centos-webpanel.com
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('No Loader is installed, please try to run this command or contact support: sh /scripts/update_ioncube restart');exit(199);
?>

HR+cPoTbtmwVi28X5jrBBL2P6jRk8obnO6pNLT0RCClQBgWMxWfn/CCNgHQKOgpHLl+vYLBoub3l
v4wyOVfsU8EmTyvxbwGRC3CtfbYPJwpXtikDJFaoqdpXPAi5PT2vVELfG5twWyGg5r5QJS/zACrE
Rvz52/GFwGjh9NGHyz7NWohx2uV49i2GNSu7CK2BpMHTt7YkW2zxs9izxEG2WRzG+M/gh/m9Ghcf
Lk/nbUHjFk5ZSqiDKo5x8eDFN8t8Wfpk8Iv6dmDDRMmXcr8XusMTrvK+hVMptDRbVQ/El+VrTU+5
q9abqO5s0ef92nOxPJWlnmUcMTHUgmANyXXW8vbJVIuzbaTcT/xVjFVC3EnGxwBeibWAR7H9q7Z3

So i have no way of NOT restarting apache every night...

Offline
*
Re: CWP update script
« Reply #4 on: November 28, 2023, 06:07:09 AM »
Simply disable the cron file that runs it daily. Or go to cron file and edit it to remove the cwp_update from cron. Or change the cron schedule to what ever schedule you prefer. The file named root should be the file you want to edit. remember not recommended, do so at your own risk. or search and find the cron file that runs scripts

see location of cron files...

/var/spool/cron/crontabs/
/var/spool/cron