Restart device and update existing python file in RPi

In general I would recommend using another tool for rebooting your entire fleet. It could be done with an update module like:

#! /bin/bash

set -e

STATE="$1"
FILES="$2"

case "$STATE" in
    NeedsArtifactReboot)
        echo "Automatic"
        ;;
esac
exit 0

However, this is slightly cumbersome, as it would change the artifact name installed. There is simply no way around it.

1 Like