Add back -d flag to daemonise

Hi needed to add back in the -d option so that it will correctly daemonize at startup..