consul_export
Advanced tools
Comparing version 0.5.1 to 0.6.0
@@ -12,2 +12,7 @@ var fs = require('fs'); | ||
if (outputter_config.reload_command) { | ||
var command_args = outputter_config.reload_command.split(' '); | ||
var reload_command = command_args.shift(); | ||
} | ||
return function(results, cb) { | ||
@@ -52,4 +57,14 @@ var soa = "@\tIN\tSOA\tns.consul.\tpostmaster.consul.\t(1429312020\t3600\t600\t86400\t0)"; | ||
write_stream.end(cb); | ||
write_stream.end(function(err) { | ||
if (err) return cb(err); | ||
// If configured, trigger a bash reload. | ||
if (outputter_config.reload_command) { | ||
logger.debug('Running reload command %s with args %s', reload_command, command_args); | ||
require('child_process').spawn(reload_command, command_args, {'cwd': '/tmp'}); | ||
} | ||
cb(); | ||
}); | ||
} | ||
}; |
{ | ||
"name": "consul_export", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"description": "Export information from Consul to be used for disaster recovery.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
24616
486
1