bugfix: always create sock dir
This commit is contained in:
parent
18b2584728
commit
724460bb9e
|
@ -40,6 +40,7 @@ Launcher.install = function (things, fn) {
|
||||||
, telebitConfig: path.join(os.homedir(), '.config/telebit/telebit.yml')
|
, telebitConfig: path.join(os.homedir(), '.config/telebit/telebit.yml')
|
||||||
, telebitdConfig: path.join(os.homedir(), '.config/telebit/telebitd.yml')
|
, telebitdConfig: path.join(os.homedir(), '.config/telebit/telebitd.yml')
|
||||||
, TELEBIT_LOG_DIR: path.join(os.homedir(), '.local/share/telebit/var/log')
|
, TELEBIT_LOG_DIR: path.join(os.homedir(), '.local/share/telebit/var/log')
|
||||||
|
, TELEBIT_SOCK_DIR: path.join(os.homedir(), '.local/share/telebit/var/run')
|
||||||
};
|
};
|
||||||
vars.telebitBinTpl = path.join(telebitRoot, 'usr/share/dist/bin/telebit.tpl');
|
vars.telebitBinTpl = path.join(telebitRoot, 'usr/share/dist/bin/telebit.tpl');
|
||||||
vars.telebitNpm = path.resolve(vars.telebitNode, '../npm');
|
vars.telebitNpm = path.resolve(vars.telebitNode, '../npm');
|
||||||
|
@ -107,8 +108,6 @@ Launcher.install = function (things, fn) {
|
||||||
var launcher = path.join(os.homedir(), 'Library/LaunchAgents/cloud.telebit.remote.plist');
|
var launcher = path.join(os.homedir(), 'Library/LaunchAgents/cloud.telebit.remote.plist');
|
||||||
try {
|
try {
|
||||||
mkdirp.sync(path.join(os.homedir(), 'Library/LaunchAgents'));
|
mkdirp.sync(path.join(os.homedir(), 'Library/LaunchAgents'));
|
||||||
mkdirp.sync(path.join(vars.telebitPath, 'bin'));
|
|
||||||
mkdirp.sync(vars.TELEBIT_LOG_DIR);
|
|
||||||
installLauncher.sync({
|
installLauncher.sync({
|
||||||
file: {
|
file: {
|
||||||
tpl: vars.telebitBinTpl
|
tpl: vars.telebitBinTpl
|
||||||
|
@ -222,7 +221,7 @@ Launcher.install = function (things, fn) {
|
||||||
err = getError(err, stderr);
|
err = getError(err, stderr);
|
||||||
if (err) { fn(err); return; }
|
if (err) { fn(err); return; }
|
||||||
// need to start it for the first time ourselves
|
// need to start it for the first time ourselves
|
||||||
launchers.node();
|
run(null, 'node');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -236,6 +235,9 @@ Launcher.install = function (things, fn) {
|
||||||
|
|
||||||
if (launchers[launcher]) {
|
if (launchers[launcher]) {
|
||||||
// console.log('Launching with launcher ' + launcher);
|
// console.log('Launching with launcher ' + launcher);
|
||||||
|
mkdirp.sync(path.join(vars.telebitPath, 'bin'));
|
||||||
|
mkdirp.sync(vars.TELEBIT_LOG_DIR);
|
||||||
|
mkdirp.sync(vars.TELEBIT_SOCK_DIR);
|
||||||
launchers[launcher]();
|
launchers[launcher]();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue