Added GenerateAllSitemaps.ps1
This commit is contained in:
parent
50262ae105
commit
b6f6dc4264
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue