# Enter and Leave states with Update modules

**URL:** <https://hub.mender.io/t/enter-and-leave-states-with-update-modules/2103>\
**Category:** General Discussions\
**Created:** [June 25, 2020, 4:16am UTC](https://hub.mender.io/t/enter-and-leave-states-with-update-modules/2103 "2020-06-25T04:16:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhoomakethu](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dhoomakethu/32/630_2.png) [@dhoomakethu](https://hub.mender.io/u/dhoomakethu)\
**Post date:** [June 25, 2020, 4:16am UTC](https://hub.mender.io/t/enter-and-leave-states-with-update-modules/2103/1 "2020-06-25T04:16:52Z")

</div>

Hello,

Is it possible to use the `_Enter` and `_Leave` states in update Modules ? If yes , what should be the syntax ? I have tried using something like this but it doesn’t seem to be working.

```auto
#!/bin/sh

case "$STATE" in
    ArtifactCommit)
        echo "In ArtifactCommit" "Files- $FILES, DEST-$DEST"
    ;;
   ArtifactCommit_Leave)
        echo "In ArtifactCommit_Leave" "Files- $FILES, DEST-$DEST"
   ;;
esac
exit 0

```

I have also tried using the state-script naming syntax (`ArtifactCommit_Leave_00`) with out any success.

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [June 25, 2020, 5:55am UTC](https://hub.mender.io/t/enter-and-leave-states-with-update-modules/2103/2 "2020-06-25T05:55:58Z")

</div>

No, it’s not possible, Enter and Leave states are reserved for state scripts only.
