hard remove existing links

This commit is contained in:
AJ ONeal 2018-06-28 12:48:20 -06:00
parent 775077da28
commit 38a4a1f0ef
1 changed files with 3 additions and 0 deletions

View File

@ -442,10 +442,13 @@ else
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
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