From d148f3b9b180f43d63de84383938de0c9f51b583 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 29 Oct 2015 23:29:12 +0100 Subject: Replace PeopleTube/PeTube by the new name PeerTube --- src/database.js | 2 +- src/pods.js | 4 ++-- src/utils.js | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/database.js b/src/database.js index 6fbd5dbc8..020bfd961 100644 --- a/src/database.js +++ b/src/database.js @@ -6,7 +6,7 @@ var logger = require('./logger') - var dbname = 'petube' + config.get('database.suffix') + var dbname = 'peertube' + config.get('database.suffix') var host = config.get('database.host') var port = config.get('database.port') diff --git a/src/pods.js b/src/pods.js index 9d6539685..30d465ee5 100644 --- a/src/pods.js +++ b/src/pods.js @@ -53,7 +53,7 @@ return callback(err) } - fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { + fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) { if (err) { logger.error('Cannot read cert file.', { error: err }) return callback(err) @@ -99,7 +99,7 @@ pods.makeFriends = function (callback) { logger.debug('Read public key...') - fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { + fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) { if (err) { logger.error('Cannot read public cert.', { error: err }) return callback(err) diff --git a/src/utils.js b/src/utils.js index 0b21565dd..82a62c43f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -63,7 +63,7 @@ // Signature ? if (all.method === 'POST' && all.data && all.sign === true) { - var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) + var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem')) signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex') } @@ -111,7 +111,7 @@ } utils.certsExist = function (callback) { - fs.exists(utils.certDir + 'petube.key.pem', function (exists) { + fs.exists(utils.certDir + 'peertube.key.pem', function (exists) { return callback(exists) }) } @@ -125,14 +125,14 @@ } logger.debug('Gen RSA keys...') - openssl.exec('genrsa', { 'out': utils.certDir + 'petube.key.pem' }, function (err) { + openssl.exec('genrsa', { 'out': utils.certDir + 'peertube.key.pem' }, function (err) { if (err) { logger.error('Cannot create private key on this pod.', { error: err }) return callback(err) } logger.debug('Manage public key...') - openssl.exec('rsa', { 'in': utils.certDir + 'petube.key.pem', 'pubout': true, 'out': utils.certDir + 'petube.pub' }, function (err) { + openssl.exec('rsa', { 'in': utils.certDir + 'peertube.key.pem', 'pubout': true, 'out': utils.certDir + 'peertube.pub' }, function (err) { if (err) { logger.error('Cannot create public key on this pod .', { error: err }) return callback(err) -- cgit v1.2.3