that's an interesting "turn of events". well, i wish you all the best, Pseudonym.
i find it interesting that you felt this all was a question of ethics (title of your post) - no, i understand it is about your integrity, whether to pretend to wanting to continue when that is not the case etc, and in the end it is your personal judgement call. i dont think you would have done something "unethical" though, if you had stayed on for now and left later. good luck with the teaching career.:-)