aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/ourusers.php
diff options
context:
space:
mode:
authorTim Starling <tstarling@users.mediawiki.org>2008-10-24 15:17:57 +0000
committerTim Starling <tstarling@users.mediawiki.org>2008-10-24 15:17:57 +0000
commit49a6511f363094e5a1050fbca1daf7d40fd3df77 (patch)
tree329289a2bf6c5c90bd889d0bb5341574d4266b8e /maintenance/ourusers.php
parent49846ef7f23644a0b9621d85cf12eeebb78ec435 (diff)
downloadmediawikicore-49a6511f363094e5a1050fbca1daf7d40fd3df77.tar.gz
mediawikicore-49a6511f363094e5a1050fbca1daf7d40fd3df77.zip
* Added a special user for nagios
* Deleted obsolete yaseo configuration
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/42474
Diffstat (limited to 'maintenance/ourusers.php')
-rw-r--r--maintenance/ourusers.php48
1 files changed, 12 insertions, 36 deletions
diff --git a/maintenance/ourusers.php b/maintenance/ourusers.php
index 620393fb992a..a7a3132baeb9 100644
--- a/maintenance/ourusers.php
+++ b/maintenance/ourusers.php
@@ -14,42 +14,14 @@
/** */
$wikiuser_pass = `wikiuser_pass`;
$wikiadmin_pass = `wikiadmin_pass`;
-$wikisql_pass = `wikisql_pass`;
+$nagios_pass = `nagios_sql_pass`;
-if ( @$argv[1] == 'yaseo' ) {
- $hosts = array(
- 'localhost',
- '211.115.107.158',
- '211.115.107.159',
- '211.115.107.160',
- '211.115.107.138',
- '211.115.107.139',
- '211.115.107.140',
- '211.115.107.141',
- '211.115.107.142',
- '211.115.107.143',
- '211.115.107.144',
- '211.115.107.145',
- '211.115.107.146',
- '211.115.107.147',
- '211.115.107.148',
- '211.115.107.149',
- '211.115.107.150',
- '211.115.107.152',
- '211.115.107.153',
- '211.115.107.154',
- '211.115.107.155',
- '211.115.107.156',
- '211.115.107.157',
- );
-} else {
- $hosts = array(
- 'localhost',
- '10.0.%',
- '66.230.200.%',
- '208.80.152.%',
- );
-}
+$hosts = array(
+ 'localhost',
+ '10.0.%',
+ '66.230.200.%',
+ '208.80.152.%',
+);
$databases = array(
'%wik%',
@@ -60,7 +32,8 @@ print "/*!40100 set old_passwords=1 */;\n";
print "/*!40100 set global old_passwords=1 */;\n";
foreach( $hosts as $host ) {
- print "--\n-- $host\n--\n\n-- wikiuser\n\n";
+ print "--\n-- $host\n--\n";
+ print "\n-- wikiuser\n\n";
print "GRANT REPLICATION CLIENT,PROCESS ON *.* TO 'wikiuser'@'$host' IDENTIFIED BY '$wikiuser_pass';\n";
print "GRANT ALL PRIVILEGES ON `boardvote%`.* TO 'wikiuser'@'$host' IDENTIFIED BY '$wikiuser_pass';\n";
foreach( $databases as $db ) {
@@ -73,6 +46,9 @@ foreach( $hosts as $host ) {
foreach ( $databases as $db ) {
print "GRANT ALL PRIVILEGES ON `$db`.* TO wikiadmin@'$host' IDENTIFIED BY '$wikiadmin_pass';\n";
}
+ print "\n-- nagios\n\n";
+ print "GRANT REPLICATION CLIENT ON *.* TO 'nagios'@'$host' IDENTIFIED BY '$nagios_pass';\n";
+
print "\n";
}