diff --git a/bin/telebitd.js b/bin/telebitd.js index d2ba805..9af49be 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -517,7 +517,7 @@ function connectTunnel() { state.otp = getOtp(); state.greenlockConf = state.config.greenlock || {}; - state.sortingHat = state.config.sortingHat || path.resolve(__dirname, '..', 'lib/sorting-hat.js'); + state.sortingHat = state.config.sortingHat; // TODO sortingHat.print(); ? diff --git a/lib/remote.js b/lib/remote.js index 3af3709..c2f8c07 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -23,6 +23,9 @@ function _connect(state) { // they can get a promise that will provide feedback about invalid tokens. var tokens = []; var auth; + if(!state.sortingHat) { + state.sortingHat = "./sorting-hat.js"; + } if (state.token) { tokens.push(state.token); }