fix daemon script