diff --git a/usr/share/install-launcher.js b/usr/share/install-launcher.js index 07b95af..42d72f4 100644 --- a/usr/share/install-launcher.js +++ b/usr/share/install-launcher.js @@ -112,6 +112,7 @@ Launcher.install = function (things, fn) { file: { tpl: vars.telebitBinTpl , launcher: path.join(vars.telebitPath, 'bin/telebit') + , executable: true } , vars: vars }); diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index dae5187..c907eb0 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -445,12 +445,13 @@ fi # NOTE: ln -sf *should* replace an existing link... but sometimes it doesn't echo " > ${real_sudo_cmde}ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app" rm -f $TELEBIT_REAL_PATH/bin/$my_app || $real_sudo_cmd rm -f $TELEBIT_REAL_PATH/bin/$my_app -ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app 2>/dev/null || \ - $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app +ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app 2>/dev/null || true +#\ $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_app /usr/local/bin/$my_app +rm -f $HOME/$my_app; ln -s $TELEBIT_REAL_PATH/bin/$my_app $HOME/ echo " > ${real_sudo_cmde}ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon" -rm -f $TELEBIT_REAL_PATH/bin/$my_daemon || $real_sudo_cmd rm -f $TELEBIT_REAL_PATH/bin/$my_daemon -ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon || \ - $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon +#rm -f $TELEBIT_REAL_PATH/bin/$my_daemon || $real_sudo_cmd rm -f $TELEBIT_REAL_PATH/bin/$my_daemon +#ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon || \ +# $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon echo " > telebit init --tty" diff --git a/usr/share/template-launcher.js b/usr/share/template-launcher.js index bd5d41d..124766f 100644 --- a/usr/share/template-launcher.js +++ b/usr/share/template-launcher.js @@ -33,8 +33,13 @@ module.exports.sync = function (opts) { .replace(/{TELEBIT_CONFIG}/g, vars.telebitConfig || '{TELEBIT_CONFIG}') .replace(/{TELEBITD_CONFIG}/g, vars.telebitdConfig || '{TELEBITD_CONFIG}') .replace(/{TELEBIT_LOG_DIR}/g, vars.TELEBIT_LOG_DIR || '{TELEBIT_LOG_DIR}') + .replace(/{TELEBIT_SOCK_DIR}/g, vars.TELEBIT_LOG_DIR || '{TELEBIT_SOCK_DIR}') ; fs.writeFileSync(f.launcher, text, 'utf8'); + if (f.executable && !/^win/i.test(os.platform())) { + // TODO not sure if chmod works on windows + fs.chmodSync(f.launcher, parseInt('755', 8)); + } }; function run() {