Update conditions for realm join in finish template

Forgot the finish script.