mirror of https://github.com/docker/docs.git
Remove mongod.lock upon restart
This commit is contained in:
parent
c370a4cf89
commit
21f4ca0565
5
index.js
5
index.js
|
@ -43,10 +43,7 @@ var start = function (callback) {
|
|||
freeport(function(err, mongoPort) {
|
||||
console.log('MongoDB: ' + mongoPort);
|
||||
console.log('webPort: ' + webPort);
|
||||
child_process.exec('kill $(ps aux -e | grep PURPOSE=KITEMATIC | awk \'{print $2}\')', function (error, stdout, stderr) {
|
||||
console.log(error);
|
||||
console.log(stdout);
|
||||
console.log(stderr);
|
||||
child_process.exec('kill $(ps aux -e | grep PURPOSE=KITEMATIC | awk \'{print $2}\') && rm ' + path.join(dataPath, 'mongod.lock'), function (error, stdout, stderr) {
|
||||
var mongoChild = child_process.spawn(path.join(process.cwd(), 'resources', 'mongod'), ['--bind_ip', '127.0.0.1', '--dbpath', dataPath, '--port', mongoPort, '--unixSocketPrefix', dataPath], {
|
||||
env: {
|
||||
PURPOSE: 'KITEMATIC'
|
||||
|
|
Loading…
Reference in New Issue