Skip to content

Instantly share code, notes, and snippets.

@ahornerr
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahornerr/d0a280d6f9c8875b1eda to your computer and use it in GitHub Desktop.
Save ahornerr/d0a280d6f9c8875b1eda to your computer and use it in GitHub Desktop.
function deployPromise(profile) {
var shasum = crypto.createHash('sha1');
shasum.update(config.secretSalt + profile.ampacheID);
ampacheMysqlPassword = shasum.digest('hex');
return mysqlHelper.setupAmpacheSQL(profile, ampacheMysqlPassword).then(function() {
configHelper.writeAmpacheConfig(profile, ampacheMysqlPassword);
configHelper.writeNginxConfig(profile).then(function() {
sh.run("sudo service nginx reload");
});
return createInstance(profile);
}).then(function(data) {
winston.debug("Completed with: ");
//winston.data(data);
profile.status = "Completed";
return profile;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment