# Inventory update after accepting a device

**URL:** <https://hub.mender.io/t/inventory-update-after-accepting-a-device/5669>\
**Category:** General Discussions\
**Created:** [March 12, 2023, 2:54pm UTC](https://hub.mender.io/t/inventory-update-after-accepting-a-device/5669 "2023-03-12T14:54:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mister\_kanister](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mister\_kanister](https://hub.mender.io/u/mister_kanister)\
**Post date:** [April 3, 2023, 2:35pm UTC](https://hub.mender.io/t/inventory-update-after-accepting-a-device/5669/3 "2023-04-03T14:35:03Z")

</div>

Usually after the device was accepted you will see something in the logs of mender-client, that the client is updating the inventory. While the mender-client is running you can add inventory on the fly. Maybe consider using `--demo-polling` so the time intervals are short.

```auto
mender setup \ 
--device-type $DEVICE_TYPE \
--server-url https://eu.hosted.mender.io \
--tenant-token $TENANT_TOKEN \
--demo-polling \
--server-cert /etc/mender/server.crt \
--data /var/lib/mender

```

You could add a custom script that will be automatically evaluated by the client and update the info.

```auto
/usr/share/mender/inventory/mender-inventory-<my_custom_script>

```

With contents like

```auto
echo "device_type=$DEVICE_TYPE"

```

Take a look at already present scripts

---

_[View the full topic](https://hub.mender.io/t/inventory-update-after-accepting-a-device/5669)._
