← Back to team overview

mvhub-dev team mailing list archive

[Branch ~mvhub-commit/mvhub/trunk] Rev 389: fixed refactor_mv_setup again..

 

Merge authors:
  Lee Goodrich (leegoodrich)
Related merge proposals:
  https://code.launchpad.net/~leegoodrich/mvhub/refactor_mv_setup/+merge/25461
  proposed by: Lee Goodrich (leegoodrich)
  review: Approve - Dan MacNeil (omacneil)
------------------------------------------------------------
revno: 389 [merge]
committer: Lee Goodrich <lgoodrich@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-05-21 16:04:18 -0400
message:
  fixed refactor_mv_setup again..
modified:
  app-mvhub/project-tools/bin/mv_update_production
  app-mvhub/project-tools/bin/mv_update_staging
  lib-mvhub/lib/MVHub/Utils/Setup.pm


--
lp:mvhub
https://code.launchpad.net/~mvhub-commit/mvhub/trunk

Your team MVHub Developers is subscribed to branch lp:mvhub.
To unsubscribe from this branch go to https://code.launchpad.net/~mvhub-commit/mvhub/trunk/+edit-subscription
=== modified file 'app-mvhub/project-tools/bin/mv_update_production'
--- app-mvhub/project-tools/bin/mv_update_production	2010-05-20 18:03:55 +0000
+++ app-mvhub/project-tools/bin/mv_update_production	2010-05-21 19:52:52 +0000
@@ -27,6 +27,12 @@
 
 my $CFG_PATH = '/var/www/mvhub/www-data/conf/nsp.conf';
 
+# KLUDGE: Overriding MV_CONFIG_FILE and SUDO_USER in order to set up
+# environment correctly. This should be fixed by a massive refactoring
+# in how we create our config objects
+$ENV{MV_CONFIG_FILE} = '/var/www/mvhub/www-data/conf/nsp.conf';
+$ENV{SUDO_USER} = 'www-data';
+
 {    # main
 	my $interactive = 0;
 	my $usage  = 0;

=== modified file 'app-mvhub/project-tools/bin/mv_update_staging'
--- app-mvhub/project-tools/bin/mv_update_staging	2010-05-21 18:31:13 +0000
+++ app-mvhub/project-tools/bin/mv_update_staging	2010-05-21 19:52:52 +0000
@@ -27,6 +27,12 @@
 
 my $CFG_PATH = '/var/www/mvhub/www-data/conf/nsp.conf';
 
+# KLUDGE: Overriding MV_CONFIG_FILE and SUDO_USER in order to set up
+# environment correctly. This should be fixed by a massive refactoring
+# in how we create our config objects
+$ENV{MV_CONFIG_FILE} = '/var/www/mvhub/www-data/conf/nsp.conf';
+$ENV{SUDO_USER} = 'www-data';
+
 {    # main
 	my $interactive = 0;
 	my $usage  = 0;
@@ -60,7 +66,7 @@
 	$prompt = "Update config files? (Y/N):";
     if ( !($interactive) || IO::Prompt::prompt( $prompt, -YN ) ) {
     	MVHub::Utils::Setup::make_config_files_for( $USERNAME, $cfg, @WEBSITE_CODES );
-        $cfg = MVHub::Utils::ConfigSimple::create_config_from( $CFG_PATH );
+        $cfg = MVHub::Utils::ConfigSimple::create_config_from( $CFG_PATH, $USERNAME );
 	}
 	
 	$prompt = "Reload databases with recent production data? (Y/N):";

=== modified file 'lib-mvhub/lib/MVHub/Utils/Setup.pm'
--- lib-mvhub/lib/MVHub/Utils/Setup.pm	2010-05-21 18:57:10 +0000
+++ lib-mvhub/lib/MVHub/Utils/Setup.pm	2010-05-21 20:01:19 +0000
@@ -678,6 +678,7 @@
 }
 
 sub remove_cron_jobs {
+    print 'Removing mvhub-cron from /etc...\n';
     unlink '/etc/cron.d/mvhub-cron';
 }