Daemon script for phd