add daemon-msg functions and read vars if it is present