# Adding state scripts to an existing snapshot artifact

**URL:** <https://hub.mender.io/t/adding-state-scripts-to-an-existing-snapshot-artifact/6188>\
**Category:** General Discussions\
**Tags:** state-scripts, raspberry-pi-4\
**Created:** [September 7, 2023, 12:16pm UTC](https://hub.mender.io/t/adding-state-scripts-to-an-existing-snapshot-artifact/6188 "2023-09-07T12:16:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pyxlwuff](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pyxlwuff](https://hub.mender.io/u/pyxlwuff)\
**Post date:** [September 7, 2023, 12:16pm UTC](https://hub.mender.io/t/adding-state-scripts-to-an-existing-snapshot-artifact/6188/1 "2023-09-07T12:16:17Z")

</div>

Hi there,

I have an image created through `mender-artifact write rootfs-image` directly from a golden Raspberry Pi 4 device running Bullseye. This automatically creates a .mender artifact that I can then deploy to the mender server and onto the device. I’m wondering if there’s a way to slip in state scripts that run when the artifact is installed? `mender-artifact modify` doesn’t seem to have anything.
