feat wikiIsOnServer
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Florian Schmitt 2024-12-05 23:31:49 +03:00
parent 9091895058
commit 86e9625246
2 changed files with 21 additions and 7 deletions

View file

@ -8,8 +8,12 @@ use Amp\Http\Client\Request;
function domainIsOnServer($domain)
{
$domainWithoutWww = preg_replace('/^www\./m', '', $domain);
return file_exists('/etc/nginx/conf.d/'.$domainWithoutWww.'.conf');
return file_exists('/etc/nginx/conf.d/'.$domain.'.conf');
}
function wikiIsOnServer($path)
{
return glob('/home/*/'.$path.'/wakka.config.php');
}
function checkIP($domain, $withWww = false, $noip6 = false)