# ArtifactReboot\_Enter not executing

**URL:** <https://hub.mender.io/t/artifactreboot-enter-not-executing/2311>\
**Category:** General Discussions\
**Created:** [August 12, 2020, 3:06pm UTC](https://hub.mender.io/t/artifactreboot-enter-not-executing/2311 "2020-08-12T15:06:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamanRatna](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@SamanRatna](https://hub.mender.io/u/SamanRatna)\
**Post date:** [August 12, 2020, 3:06pm UTC](https://hub.mender.io/t/artifactreboot-enter-not-executing/2311/1 "2020-08-12T15:06:18Z")

</div>

Hi,

Does ArtifactReboot state happen by default ? It didn’t happen by default in my system then I tried to run:

os.system(‘sudo shutdown -r now’)

from inside ArtifactReboot\_Enter script. It didn’t work.

To check properly, I made scripts for ArtifactInstall\_Enter, ArtifactInstall\_Leave, ArtifactReboot\_Enter and ArtifactCommit\_Leave.

All the scripts run except for the ArtifactReboot\_Enter. I am doing this project for application update only for directory update.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [August 12, 2020, 3:48pm UTC](https://hub.mender.io/t/artifactreboot-enter-not-executing/2311/2 "2020-08-12T15:48:11Z")

</div>

I’m not sure you want to do a shutdown in the state scripts as it can interfere with Mender’s understanding of the state. Probably you want to implement a custom update module that supports rebooting. [See this link](https://github.com/mendersoftware/mender/blob/2.3.0/Documentation/update-modules-v3-file-api.md) and specifically the “NeedsArtifactReboot” details.

Drew
