You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by fr...@apache.org on 2017/04/20 18:40:17 UTC
[28/44] incubator-trafficcontrol git commit: reset and seed instead
of setup
reset and seed instead of setup
(cherry picked from commit 7addd620a402ac57b84939ff462131796c750449)
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/427af728
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/427af728
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/427af728
Branch: refs/heads/2.0.x
Commit: 427af7287691e3a44b79c586798c308ee8d1bf24
Parents: d58945c
Author: Dan Kirkwood <da...@gmail.com>
Authored: Fri Apr 14 11:23:54 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Wed Apr 19 15:36:19 2017 -0600
----------------------------------------------------------------------
traffic_ops/install/bin/_postinstall | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/427af728/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index 7a8f50a..751f78e 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -588,7 +588,11 @@ sub setupDatabase {
$ENV{PGUSER} = $todbconf->{"dbAdminUser"};
$ENV{PGPASSWORD} = $todbconf->{"dbAdminPw"};
chdir("/opt/traffic_ops/app");
- my $result = InstallUtils::execCommand( "/usr/bin/perl", "db/admin.pl", "--env=production", "setup" );
+ my $result = InstallUtils::execCommand( "/usr/bin/perl", "db/admin.pl", "--env=production", "reset" );
+
+ if ( $result == 0 ) {
+ $result = InstallUtils::execCommand( "/usr/bin/perl", "db/admin.pl", "--env=production", "seed" );
+ }
if ( $result != 0 ) {
errorOut("Database initialization failed");