Mercurial > hg > rc2
comparison bin/initdb.sh @ 9:0c9c57d9d4dd
maybe stragglers from 1.3.3, after another mistaken apt-get install of 1.2.3
| author | Charlie Root |
|---|---|
| date | Fri, 04 Jan 2019 06:38:56 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 8:bf99236cc5cd | 9:0c9c57d9d4dd |
|---|---|
| 1 #!/usr/bin/env php | |
| 2 <?php | |
| 3 /* | |
| 4 +-----------------------------------------------------------------------+ | |
| 5 | bin/initdb.sh | | |
| 6 | | | |
| 7 | This file is part of the Roundcube Webmail client | | |
| 8 | Copyright (C) 2010-2015, The Roundcube Dev Team | | |
| 9 | Copyright (C) 2010-2015, Kolab Systems AG | | |
| 10 | | | |
| 11 | Licensed under the GNU General Public License version 3 or | | |
| 12 | any later version with exceptions for skins & plugins. | | |
| 13 | See the README file for a full license statement. | | |
| 14 | | | |
| 15 | PURPOSE: | | |
| 16 | Create database schema | | |
| 17 +-----------------------------------------------------------------------+ | |
| 18 | Author: Aleksander Machniak <alec@alec.pl> | | |
| 19 +-----------------------------------------------------------------------+ | |
| 20 */ | |
| 21 | |
| 22 define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); | |
| 23 | |
| 24 require_once INSTALL_PATH . 'program/include/clisetup.php'; | |
| 25 | |
| 26 // get arguments | |
| 27 $opts = rcube_utils::get_opt(array( | |
| 28 'd' => 'dir', | |
| 29 )); | |
| 30 | |
| 31 if (empty($opts['dir'])) { | |
| 32 rcube::raise_error("Database schema directory not specified (--dir).", false, true); | |
| 33 } | |
| 34 | |
| 35 // Check if directory exists | |
| 36 if (!file_exists($opts['dir'])) { | |
| 37 rcube::raise_error("Specified database schema directory doesn't exist.", false, true); | |
| 38 } | |
| 39 | |
| 40 rcmail_utils::db_init($opts['dir']); | |
| 41 | |
| 42 ?> |
