diff options
author | Michael Scherer <misc@mageia.org> | 2011-06-16 22:17:58 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-06-16 22:17:58 +0000 |
commit | ab353f5adfb6a4d1dedb462ba9acc14485c05740 (patch) | |
tree | 8a1fc5b6df7b521473d5c817e0b8997163ca8970 /modules/mediawiki | |
parent | 7b405863c4db25bc7f89822d7595ffb46817e47b (diff) | |
download | puppet-ab353f5adfb6a4d1dedb462ba9acc14485c05740.tar puppet-ab353f5adfb6a4d1dedb462ba9acc14485c05740.tar.gz puppet-ab353f5adfb6a4d1dedb462ba9acc14485c05740.tar.bz2 puppet-ab353f5adfb6a4d1dedb462ba9acc14485c05740.tar.xz puppet-ab353f5adfb6a4d1dedb462ba9acc14485c05740.zip |
add php script to finish script deployment
Diffstat (limited to 'modules/mediawiki')
-rw-r--r-- | modules/mediawiki/files/init_wiki.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/mediawiki/files/init_wiki.php b/modules/mediawiki/files/init_wiki.php new file mode 100644 index 00000000..bb2137ae --- /dev/null +++ b/modules/mediawiki/files/init_wiki.php @@ -0,0 +1,24 @@ +<? +$wiki_root = $argv[1]; +$mw_root = '/usr/share/mediawiki'; + +// DefaultSettings.php complain if not defined +define('MEDIAWIKI',1); + +require_once("$mw_root/includes/Defines.php"); +require_once("$mw_root/includes/AutoLoader.php"); +require_once("$mw_root/includes/GlobalFunctions.php"); +include("$wiki_root/LocalSettings.php"); + +$dbclass = 'Database'.ucfirst($wgDBtype); +$dbc = new $dbclass; + +$wgDatabase = $dbc->newFromParams($wgDBserver, + $wgDBuser, + $wgDBpassword, $wgDBname, 1); + +$wgDatabase->initial_setup($wgDBpassword, $wgDBname); +$wgDatabase->setup_database(); + +rmdir("$wiki_root/config"); +?> |