#!/bin/sh -e

# Note: This snap is used for testing which requires this configure hook
# to be kept in sync with the default-configure hook

# Snapshot information
infoFile="$SNAP_COMMON"/configure-info
valueA=$( snapctl get a )
valueB=$( snapctl get b )
{
    echo "a: $valueA"
    echo "b: $valueB"
    echo "services:"
    snapctl services
} > "$infoFile"

# Append "a" to indicate configure hook modified it
snapctl set a="$valueA+configureHook"
