add new constant for cli: SELF_NAME

This commit is contained in:
slawkens 2024-01-30 18:08:27 +01:00
parent a8a896e0f5
commit 6c4fd4ed27
2 changed files with 3 additions and 1 deletions

2
aac
View File

@ -11,6 +11,8 @@ if(!IS_CLI) {
require_once SYSTEM . 'functions.php'; require_once SYSTEM . 'functions.php';
require_once SYSTEM . 'init.php'; require_once SYSTEM . 'init.php';
define('SELF_NAME', basename(__FILE__));
use MyAAC\Plugins; use MyAAC\Plugins;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;

View File

@ -24,7 +24,7 @@ class CronjobInstallCommand extends Command
return 2; return 2;
} }
$job = '* * * * * /usr/bin/php ' . BASE . 'ma cronjob >> ' . SYSTEM . 'logs/cron.log 2>&1'; $job = '* * * * * /usr/bin/php ' . BASE . SELF_NAME . ' cronjob >> ' . SYSTEM . 'logs/cron.log 2>&1';
if ($this->cronjobExists($job)) { if ($this->cronjobExists($job)) {
$io->info('MyAAC cronjob already installed.'); $io->info('MyAAC cronjob already installed.');