added if check around unattend.sh