Index: branches/ariel/xmldumps-backup/dumpcentralauth.sh |
— | — | @@ -16,9 +16,13 @@ |
17 | 17 | echo "exiting..." |
18 | 18 | exit 1 |
19 | 19 | 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` |
23 | 27 | if [ -z "$dbcluster" -o -z "$wiki" -o -z "$host" ]; then |
24 | 28 | echo "can't locate db server for centralauth, exiting." |
25 | 29 | exit 1 |