| Revision 852,
604 bytes
checked in by cdleonard@…, 4 years ago
(diff) |
|
svn:eol-style native in trunk. Also svn:executable on all scripts
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #! /usr/bin/env php |
|---|
| 2 | <?php |
|---|
| 3 | |
|---|
| 4 | require_once(dirname($argv[0]) . "/utilities.php"); |
|---|
| 5 | |
|---|
| 6 | // This is a really dumb script that calls to mysqldump. |
|---|
| 7 | // Uses auth stuff from config.php. |
|---|
| 8 | // FIXME: password visible in ps list. How retarded. |
|---|
| 9 | |
|---|
| 10 | $cmdline = "mysql"; |
|---|
| 11 | $cmdline .= " --user=".IA_DB_USER; |
|---|
| 12 | $cmdline .= " --password=".IA_DB_PASS; |
|---|
| 13 | if (strstr(IA_DB_HOST, ":")) { |
|---|
| 14 | list($host, $port) = explode(':', IA_DB_HOST); |
|---|
| 15 | $cmdline .= " --host=".$host; |
|---|
| 16 | $cmdline .= " --port=".$port; |
|---|
| 17 | } else { |
|---|
| 18 | $cmdline .= " --host=".IA_DB_HOST; |
|---|
| 19 | } |
|---|
| 20 | $cmdline .= " ".IA_DB_NAME; |
|---|
| 21 | log_print("Exec $cmdline"); |
|---|
| 22 | |
|---|
| 23 | magic_exec($cmdline); |
|---|
| 24 | |
|---|
| 25 | ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.