From 5eb4cdefb759fdc1664243262600d15b86ffde94 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 27 Jun 2018 04:24:56 -0600 Subject: [PATCH] node-based install launcher tested on macOS --- bin/telebitd.js | 1 + .../cloud.telebit.remote.plist.tpl | 4 +- .../cloud.telebit.remote.plist.tpl | 4 +- usr/share/install-launcher.js | 105 +++++++++++------- usr/share/install_helper.sh | 2 + usr/share/template-launcher.js | 14 ++- 6 files changed, 81 insertions(+), 49 deletions(-) diff --git a/bin/telebitd.js b/bin/telebitd.js index ec7406f..d2b5910 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -408,6 +408,7 @@ function serveControlsHelper() { // mask is so that processes owned by other users // can speak to this process, which is probably root-owned var oldUmask = process.umask(0x0000); + require('mkdirp').sync(path.resolve(state._ipc.path, '..')); controlServer.listen({ path: state._ipc.path , writableAll: true diff --git a/usr/share/dist/Library/LaunchDaemons/cloud.telebit.remote.plist.tpl b/usr/share/dist/Library/LaunchDaemons/cloud.telebit.remote.plist.tpl index a455b8f..513db78 100644 --- a/usr/share/dist/Library/LaunchDaemons/cloud.telebit.remote.plist.tpl +++ b/usr/share/dist/Library/LaunchDaemons/cloud.telebit.remote.plist.tpl @@ -17,9 +17,9 @@ TELEBIT_PATH {TELEBIT_PATH} NODE_PATH - {TELEBIT_PATH}/lib/node_modules + {NODE_PATH} NPM_CONFIG_PREFIX - {TELEBIT_PATH} + {NPM_CONFIG_PREFIX} UserName diff --git a/usr/share/dist/etc/skel/Library/LaunchAgents/cloud.telebit.remote.plist.tpl b/usr/share/dist/etc/skel/Library/LaunchAgents/cloud.telebit.remote.plist.tpl index 5438d57..cca30d3 100644 --- a/usr/share/dist/etc/skel/Library/LaunchAgents/cloud.telebit.remote.plist.tpl +++ b/usr/share/dist/etc/skel/Library/LaunchAgents/cloud.telebit.remote.plist.tpl @@ -19,9 +19,9 @@ TELEBIT_PATH {TELEBIT_PATH} NODE_PATH - {TELEBIT_PATH}/lib/node_modules + {NODE_PATH} NPM_CONFIG_PREFIX - {TELEBIT_PATH} + {NPM_CONFIG_PREFIX}