r98115 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98114‎ | r98115 | r98116 >
Date:07:05, 26 September 2011
Author:ariel
Status:deferred
Tags:
Comment:
fix path for db.php; add mwscript wrapper
Modified paths:
  • /branches/ariel/xmldumps-backup/dumpcentralauth.sh (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/dumpcentralauth.sh
@@ -16,9 +16,13 @@
1717 echo "exiting..."
1818 exit 1
1919 fi
20 -dbcluster=`grep centralauth /apache/common/php/wmf-config/db.php | awk -F"'" ' { print $4 }'`
21 -wiki=`grep $dbcluster /apache/common/php/wmf-config/db.php | grep wiki | head -1 | awk -F"'" ' { print $2 }'`
22 -host=`echo 'echo wfGetLB()->getServerName(0);' | php /apache/common/php/maintenance/eval.php $wiki`
 20+if [ ! -f "/apache/common/wmf-config/db.php" ]; then
 21+ echo "failed to find db.php, exiting..."
 22+ exit 1
 23+fi
 24+dbcluster=`grep centralauth /apache/common/wmf-config/db.php | awk -F"'" ' { print $4 }'`
 25+wiki=`grep $dbcluster /apache/common/wmf-config/db.php | grep wiki | head -1 | awk -F"'" ' { print $2 }'`
 26+host=`echo 'echo wfGetLB()->getServerName(0);' | php /apache/common/multiversion/MWScript.php eval.php $wiki`
2327 if [ -z "$dbcluster" -o -z "$wiki" -o -z "$host" ]; then
2428 echo "can't locate db server for centralauth, exiting."
2529 exit 1

Status & tagging log