Read pidfile from configuration file and create it from main program