templates/hook.template.js
function add_group() {
    server.EntryGroupNew(function(err, path) {
      if (err) {
        sails.log.error('DBus: Could not call org.freedesktop.Avahi.Server.EntryGroupNew');
        return;
      }
      service.getInterface(
        path,
        avahi.DBUS_INTERFACE_ENTRY_GROUP.value,
        function (
          err,
          newGroup
        ) {
          group = newGroup;
          add_service();
        }
      )
    });
  }
function add_group() {
    server.EntryGroupNew(function(err, path) {
      if (err) {
        sails.log.error('DBus: Could not call org.freedesktop.Avahi.Server.EntryGroupNew');
        return;
      }
      service.getInterface(
        path,
        avahi.DBUS_INTERFACE_ENTRY_GROUP.value,
        function (
          err,
          newGroup
        ) {
          group = newGroup;
          add_service();
        }
      )
    });
  }
function add_group ( ) { server . EntryGroupNew ( function ( err , path ) { if ( err ) { sails . log . error ( 'DBus: Could not call org.freedesktop.Avahi.Server.EntryGroupNew' ) ; return ; } service . getInterface ( path , avahi . DBUS_INTERFACE_ENTRY_GROUP . value , function ( err , newGroup ) { group = newGroup ; add_service ( ) ; } ) } ) ; }
Add a new EntryGroup for our service.
Add a new EntryGroup for our service .