sy script now includes daemon handling