# Standalone State Scripts not executed

**URL:** <https://hub.mender.io/t/standalone-state-scripts-not-executed/3965>\
**Category:** General Discussions\
**Tags:** state-scripts\
**Created:** [August 4, 2021, 9:11am UTC](https://hub.mender.io/t/standalone-state-scripts-not-executed/3965 "2021-08-04T09:11:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jabas](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jabas](https://hub.mender.io/u/jabas)\
**Post date:** [August 4, 2021, 9:12am UTC](https://hub.mender.io/t/standalone-state-scripts-not-executed/3965/1 "2021-08-04T09:12:00Z")

</div>

Hi, I’m running Mender standalone client 1.6.0. I have built an artifact with state scripts using Yocto (Sumo). Both 1.4.0 and 1.6.0 produce the same result. If I look inside the artifact, they are indeed included. For me, things happen differently to other posters. My scripts get extracted to whatever folder I run “mender” (not /var/lib/mender/scripts or /etc/mender/scripts).

When mender runs, the scripts are “processed” but never executed:

DEBU[0000] installer: processing script: ArtifactInstall\_Enter\_00 module=installer  
DEBU[0000] installer: processing script: ArtifactInstall\_Leave\_50\_x module=installer  
DEBU[0000] installer: processing script: ArtifactInstall\_Leave\_99 module=installer  
DEBU[0000] installer: processing script: ArtifactReboot\_Leave\_50 module=installer  
DEBU[0000] installer: processing script: ArtifactCommit\_Enter\_50 module=installer

Basically copied from : [https://github.com/mendersoftware/meta-mender/blob/dunfell/meta-mender-demo/recipes-mender/example-state-scripts/example-state-scripts\_1.0.bb:](https://github.com/mendersoftware/meta-mender/blob/dunfell/meta-mender-demo/recipes-mender/example-state-scripts/example-state-scripts_1.0.bb:)

```auto
#!/bin/sh
 
echo "$(mender show-artifact): $(basename "$0") was called!" >&2
exit 0

```

Manually running each script executes fine but I never see this in the debug.

I tried adding:

touch /boot/test.txt to the script and the file is never created. I’ve also tried manually copying the scripts to both /var/lib/mender/scripts and /etc/mender/scripts on the calling partition (in case the mender client looks for the script in these locations - not where it extracted them) but still nothing gets called.

Help please

---

<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:** [August 5, 2021, 7:27am UTC](https://hub.mender.io/t/standalone-state-scripts-not-executed/3965/2 "2021-08-05T07:27:19Z")

</div>

Hey @jabas,

Support for running state scripts in standalone mode was added in 2.0.0. I suggest you upgrade to the latest version in sumo.

---

<div class="post-metadata">

**Author:** ![jabas](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jabas](https://hub.mender.io/u/jabas)\
**Post date:** [August 5, 2021, 8:53am UTC](https://hub.mender.io/t/standalone-state-scripts-not-executed/3965/3 "2021-08-05T08:53:59Z")

</div>

Ah. Very useful. Thank you for pointing me in the right direction and for your quick response.

---

<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:** [August 5, 2021, 9:13am UTC](https://hub.mender.io/t/standalone-state-scripts-not-executed/3965/4 "2021-08-05T09:13:59Z")

</div>

My pleasure. Be aware that there are [some restrictions](https://docs.mender.io/artifact-creation/state-scripts#standalone-mode) in standalone mode as well.
