fixing cli commands

This commit is contained in:
Renan Bernordi 2025-06-26 18:12:51 -03:00
parent 22e836b707
commit deea4d6a2a
2 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@
* If CLEANUP_DAYS is not set, no files will be cleaned.
*/
require_once __DIR__ . '/../app/vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';
use League\CLImate\CLImate;
use Dotenv\Dotenv;
@ -23,7 +23,7 @@ $climate->br();
$cleanupDays = 0;
try {
$dotenv = Dotenv::createImmutable(__DIR__ . '/../app');
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
$climate->out('Environment variables loaded');
$cleanupDays = $_ENV['CLEANUP_DAYS'];
@ -33,7 +33,7 @@ try {
}
if (!defined('CACHE_DIR')) {
define('CACHE_DIR', __DIR__ . '/../app/cache');
define('CACHE_DIR', __DIR__ . '/../cache');
}
if ($cleanupDays == 0) {

View file

@ -13,7 +13,7 @@
* 2. IP:PORT:USER:PASSWORD
*/
require_once __DIR__ . '/../app/vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';
use League\CLImate\CLImate;
use Dotenv\Dotenv;
@ -24,7 +24,7 @@ $climate->bold()->out('Proxy List Cache Updater');
$climate->br();
try {
$dotenv = Dotenv::createImmutable(__DIR__ . '/../app');
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
$climate->out('Environment variables loaded');
} catch (\Exception $e) {
@ -33,7 +33,7 @@ try {
}
if (!defined('CACHE_DIR')) {
define('CACHE_DIR', __DIR__ . '/../app/cache');
define('CACHE_DIR', __DIR__ . '/../cache');
}
if (!isset($_ENV['PROXY_LIST']) || empty($_ENV['PROXY_LIST'])) {