Skip to content

Commit

Permalink
Merge pull request #272 from prey/download-link
Browse files Browse the repository at this point in the history
New host for prey download
  • Loading branch information
javo authored Feb 21, 2017
2 parents be7e4b2 + fd61f19 commit af12693
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/agent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var boot = function() {
commands.start_watching(); // add/remove from list when started or stopped

if (config.get('auto_update'))
updater.check_every(60 * 60 * 1000); // check every one hour for new releases
updater.check_every(12 * 60 * 60 * 1000); // check every 12 hours for new releases

logger.info('Initialized.');
// We initialize the triggers after all the plugins have been enabled,
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports.check_every = function(interval, cb) {
if (!system.paths.versions)
return cb && cb(no_versions_support_error());

var interval = interval || 60 * 60 * 1000; // one hour by default
var interval = interval || 12 * 60 * 60 * 1000; // twelve hours by default
timer = setInterval(check_for_update, interval);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var delayed = whenever('buckle');

var npm_package_url = 'https://registry.npmjs.org/prey';

var releases_host = 'https://storage.googleapis.com',
releases_url = releases_host + '/prey_public/prey-releases/node-client/',
var releases_host = 'https://downloads.preyproject.com',
releases_url = releases_host + '/prey-client-releases/node-client/',
latest_text = 'latest.txt',
checksums = 'shasums.json',
package_format = '.zip';
Expand Down
4 changes: 2 additions & 2 deletions test/lib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('package.get_latest', function() {
spy.restore();
cut.restore();
err.message.should.eql('Stopping here.');
spy.args[0][0].should.eql("https://storage.googleapis.com/prey_public/prey-releases/node-client/latest.txt");
spy.args[0][0].should.eql("https://downloads.preyproject.com/prey-client-releases/node-client/latest.txt");
spy.calledOnce.should.be.true;
done();
});
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('package.get_latest', function() {

it('requests the package', function (done) {
var file_name = get_file_name(new_version),
url = 'https://storage.googleapis.com/prey_public/prey-releases/node-client/' + new_version + '/' + file_name,
url = 'https://downloads.preyproject.com/prey-client-releases/node-client/' + new_version + '/' + file_name,
outfile = join(tmpdir, file_name);

var getter = sinon.stub(needle, 'get', function(requested_url, opts, cb) {
Expand Down

0 comments on commit af12693

Please sign in to comment.