> For the complete documentation index, see [llms.txt](https://cddnss.knaup.pw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cddnss.knaup.pw/function-list/synconipchange.md).

# syncOnIpChange

### cddnss.syncOnIpChange

Syncs the DNS records every time the external ip changes.

####

#### Parameters:

* `records` *The records that should be updated.* `[Array<`[`Record`](/types/record.md)`>]`
* `callback` *The callback that gets called every time the updating was done.* `[`[`MultiSyncCallback`](/types/multisynccallback.md)`]`

####

#### Returns:

* *The id of the interval that is needed to stop the syncing.* `[Promise<string>]`

```typescript
const changeListenerId: string =
  cddnss.syncOnIpChange(records , (recordData: Array<RecordData>) => {
    console.log(recordData);
  });
```
