#!/usr/bin/bash

case "$1" in
    config)
        echo "id: example_pre_script"
        echo "description: Example pre-script"
        echo "stage: activated, rollback"
        echo "substage: pre"
        exit 0
    ;;
esac

if [ -n "$2" ] && [ "$1" = "prev" ];
then
    #Do exit without any actions or do something special
    echo "message: previous state is $2, no actions required"
    exit 0
fi

# TODO something
echo "message: Run /usr/share/astra-update-service/scripts/02_example-pre"
#echo "warning: example warning"
#echo "error: example error"
