Skip to content

Commit

Permalink
Reduced console output, now only emitting each storage command in ver…
Browse files Browse the repository at this point in the history
…bose mode.

Cleaned up spacing a bit.
  • Loading branch information
jhuckaby committed Jan 10, 2016
1 parent 7a70618 commit 7cec15c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/storage-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process.chdir( path.dirname( __dirname ) );
// load app's config file
var config = require('../conf/config.json');

// shift files off beginning of arg array
// shift commands off beginning of arg array
var argv = JSON.parse( JSON.stringify(process.argv.slice(2)) );
var commands = [];
while (argv.length && !argv[0].match(/^\-/)) {
Expand Down Expand Up @@ -98,13 +98,13 @@ var storage = new StandaloneStorage(config.Storage, function(err) {
// make sure this is only run once
storage.get( 'global/users', function(err) {
if (!err) {
print( "\nStorage has already been set up. There is no need to run this command again.\n\n" );
print( "Storage has already been set up. There is no need to run this command again.\n\n" );
process.exit(1);
}

async.eachSeries( setup.storage,
function(params, callback) {
print( "Executing: " + JSON.stringify(params) + "\n" );
verbose( "Executing: " + JSON.stringify(params) + "\n" );
// [ "listCreate", "global/users", { "page_size": 100 } ]
var func = params.shift();
params.push( callback );
Expand All @@ -124,7 +124,9 @@ var storage = new StandaloneStorage(config.Storage, function(err) {
},
function(err) {
if (err) throw err;
print( "\nSetup completed successfully!\n" );
if (args.verbose) print("\n");

print( "Setup completed successfully!\n" );
print( "This server ("+hostname+") has been added as the single primary master server.\n" );
print( "An administrator account has been created with username 'admin' and password 'admin'.\n" );
print( "You should now be able to start the service by typing: '/opt/cronicle/bin/control.sh start'\n" );
Expand Down

0 comments on commit 7cec15c

Please sign in to comment.