# ArtifactInstall\_Leave state script not executed

**URL:** <https://hub.mender.io/t/artifactinstall-leave-state-script-not-executed/3203>\
**Category:** General Discussions\
**Created:** [February 11, 2021, 9:37am UTC](https://hub.mender.io/t/artifactinstall-leave-state-script-not-executed/3203 "2021-02-11T09:37:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwjbosman](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dwjbosman/32/961_2.png) [@dwjbosman](https://hub.mender.io/u/dwjbosman)\
**Post date:** [February 11, 2021, 9:37am UTC](https://hub.mender.io/t/artifactinstall-leave-state-script-not-executed/3203/1 "2021-02-11T09:37:32Z")

</div>

Mender 2.5

I have provided a custom state script for the ArtifactInstall\_Leave event. However I am not sure if it executes. The mender deployment log shows

> 1:00"}  
> {“level”:“info”,“message”:“State transition: update-after-store [Download\_Leave] -\u003e update-install [ArtifactInstall]”,“timestamp”:“2021-02-11T08:02:54+01:00”}  
> {“level”:“info”,“message”:“Enabling partition with new image installed to be a boot candidate: 3”,“timestamp”:“2021-02-11T08:02:54+01:00”}  
> {“level”:“info”,“message”:“Probing the Bootloader environment for which separator to use”,“timestamp”:“2021-02-11T08:02:54+01:00”}  
> {“level”:“info”,“message”:"Writing map[mender\_uboot\_separator:1] to the U-Boot environment, using separator: ",“timestamp”:“2021-02-11T08:02:54+01:00”}  
> {“level”:“info”,“message”:"Writing map[mender\_uboot\_separator:] to the U-Boot environment, using separator: ",“timestamp”:“2021-02-11T08:02:54+01:00”}  
> {“level”:“info”,“message”:"Writing map[upgrade\_available:1 bootcount:0 mender\_boot\_part:3 mender\_boot\_part\_hex:3] to the U-Boot environment, using separator: ",“timestamp”:“2021-02-11T08:02:55+01:00”}  
> {“level”:“info”,“message”:“State transition: update-install [ArtifactInstall] -\u003e reboot [ArtifactReboot\_Enter]”,“timestamp”:“2021-02-11T08:02:55+01:00”}  
> {“level”:“info”,“message”:“Rebooting device(s)”,“timestamp”:“2021-02-11T08:02:55+01:00”}  
> {“level”:“info”,“message”:“Mender rebooting from active partition: /dev/mmcblk0p2”,“timestamp”:“2021-02-11T08:02:55+01:00”}  
> {“level”:“info”,“message”:“Running Mender client version: 2.4.1”,“timestamp”:“2019-02-14T11:12:23+01:00”}  
> {“level”:“info”,“message”:“State transition: init [none] -\u003e after-reboot [ArtifactReboot\_Leave]”,“timestamp”:“2019-02-14T11:12:23+01:00”}

It shows the various state transitions. However it doesn’t show ArtifactInstall\_Leave in between Download\_Leave and Reboot\_Enter.

1. Should the log show ArtifactInstall\_Leave?
2. Should I see the execution of the script in the log?

---

<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:** [February 11, 2021, 4:15pm UTC](https://hub.mender.io/t/artifactinstall-leave-state-script-not-executed/3203/2 "2021-02-11T16:15:09Z")

</div>

Hi @dwjbosman if you want to log from your script, anything you echo to stderr will show in the log.

What is the name of your script? How are you adding it to the artifact? Can you provide the contents of the script?

Drew

---

<div class="post-metadata">

**Author:** ![dwjbosman](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dwjbosman/32/961_2.png) [@dwjbosman](https://hub.mender.io/u/dwjbosman)\
**Post date:** [February 11, 2021, 10:46pm UTC](https://hub.mender.io/t/artifactinstall-leave-state-script-not-executed/3203/3 "2021-02-11T22:46:09Z")

</div>

I changed the mender-client systemd service:

ExecStart=/usr/bin/mender --log-level debug daemon

The log shows additional info including that the scripts are actually called.
