Switched to a tools directory for commands.

This commit is contained in:
flash 2023-07-10 22:52:30 +00:00
parent a4059de89a
commit 839fd4e7f1
45 changed files with 698 additions and 1299 deletions

View file

@ -105,15 +105,8 @@ if(!is_dir(MSZ_STORAGE))
$msz = new MisuzuContext($db, $cfg);
if(MSZ_CLI) { // Temporary backwards compatibility measure, remove this later
if(realpath($_SERVER['SCRIPT_FILENAME']) === __FILE__) {
if(($argv[1] ?? '') === 'cron' && ($argv[2] ?? '') === 'low')
$argv[2] = '--slow';
array_shift($argv);
echo shell_exec(__DIR__ . '/msz ' . implode(' ', $argv));
}
if(MSZ_CLI)
return;
}
// Everything below here should eventually be moved to index.php, probably only initialised when required.
// Serving things like the css/js doesn't need to initialise sessions.