Police shoot man armed with knife, rifle