Added GenerateAllSitemaps.ps1

This commit is contained in:
Ampera 2023-03-12 08:41:20 -04:00
parent 50262ae105
commit b6f6dc4264
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/usr/bin/env pwsh
$sitenames = Get-ChildItem -Path /web1-data1/wikiconf/sites/ -Directory | select -ExpandProperty Name
foreach($name in $sitenames){
if($name -like "*.d"){
$actualname = $name.Replace(".d", "")
$env:MT_WIKI_NAME = $actualname
php /web1-data1/wikiroot/current/w/maintenance/generateSitemap.php --fspath=/web1-data1/wikidata/sitemap/$actualname --urlpath=/sitemap/ --server=https://$actualname --identifier=$actualname --memory-limit=150M --skip-redirects
}
}

View File

@ -0,0 +1,7 @@
GenerateAllSitemaps
Quick and dirty powershell script which generates sitmaps for all the sites in wikiconf/sites
Don't put things that aren't sites into wikiconf/sites and nobody will get hurt
Run every couple days or so on the openwiki stack via cron