update links and executable perms
This commit is contained in:
parent
38a4a1f0ef
commit
4d6f51f204
|
@ -112,6 +112,7 @@ Launcher.install = function (things, fn) {
|
||||||
file: {
|
file: {
|
||||||
tpl: vars.telebitBinTpl
|
tpl: vars.telebitBinTpl
|
||||||
, launcher: path.join(vars.telebitPath, 'bin/telebit')
|
, launcher: path.join(vars.telebitPath, 'bin/telebit')
|
||||||
|
, executable: true
|
||||||
}
|
}
|
||||||
, vars: vars
|
, vars: vars
|
||||||
});
|
});
|
||||||
|
|
|
@ -445,12 +445,13 @@ fi
|
||||||
# NOTE: ln -sf *should* replace an existing link... but sometimes it doesn't
|
# 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"
|
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
|
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 || \
|
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
|
#\ $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"
|
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
|
#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 || \
|
#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
|
# $real_sudo_cmd ln -sf $TELEBIT_REAL_PATH/bin/$my_daemon /usr/local/bin/$my_daemon
|
||||||
|
|
||||||
|
|
||||||
echo " > telebit init --tty"
|
echo " > telebit init --tty"
|
||||||
|
|
|
@ -33,8 +33,13 @@ module.exports.sync = function (opts) {
|
||||||
.replace(/{TELEBIT_CONFIG}/g, vars.telebitConfig || '{TELEBIT_CONFIG}')
|
.replace(/{TELEBIT_CONFIG}/g, vars.telebitConfig || '{TELEBIT_CONFIG}')
|
||||||
.replace(/{TELEBITD_CONFIG}/g, vars.telebitdConfig || '{TELEBITD_CONFIG}')
|
.replace(/{TELEBITD_CONFIG}/g, vars.telebitdConfig || '{TELEBITD_CONFIG}')
|
||||||
.replace(/{TELEBIT_LOG_DIR}/g, vars.TELEBIT_LOG_DIR || '{TELEBIT_LOG_DIR}')
|
.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');
|
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() {
|
function run() {
|
||||||
|
|
Loading…
Reference in New Issue