fixed daemon script for server