# Conceptual use for remote update

**URL:** <https://hub.mender.io/t/conceptual-use-for-remote-update/1461>\
**Category:** General Discussions\
**Tags:** update-modules\
**Created:** [January 22, 2020, 2:14pm UTC](https://hub.mender.io/t/conceptual-use-for-remote-update/1461 "2020-01-22T14:14:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![eystein](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@eystein](https://hub.mender.io/u/eystein)\
**Post date:** [January 22, 2020, 11:39pm UTC](https://hub.mender.io/t/conceptual-use-for-remote-update/1461/2 "2020-01-22T23:39:18Z")

</div>

Hi @colinbes,

Indeed this seems like a basic use case that it would be nice to have some better documentation / tutorials around.

As you mention there are many ways to achieve this. How is the software itself packaged (inside the tar file)? Is it simply an executable, or several executables? If several, should they end up in the same directory?

For the simplest case (single executable and need for scripting), you can do this:

- Use the [Single File](https://hub.mender.io/t/single-file) Update Module. Your executable is the “Single File” that you will package.
- Your script(s) should be packaged as [State scripts](https://docs.mender.io/2.2/artifacts/state-scripts). If it’s simply a post-install script, you can use the `ArtifactInstall_Leave` state, e.g. call your script `ArtifactInstall_Leave_01_postinstall`

To include your state script(s) with an Artifact using an Update Module, you can pass them to the Artifact generator in this way:

```auto
...
./single-file-artifact-gen -n ${ARTIFACT_NAME} -t ${DEVICE_TYPE} -d ${DEST_DIR} -o ${OUTPUT_PATH} ${FILE} -- -s ArtifactInstall_Leave_01_postinstall

```

Was this along the lines of what you were thinking?

---

_[View the full topic](https://hub.mender.io/t/conceptual-use-for-remote-update/1461)._
