#!/bin/sh

snapctl set service-option=$(snapctl get service-option-source)

COMMAND=$(snapctl get command)
if [ "$COMMAND" != "" ]; then
    if [ "$COMMAND" = "restart" ]; then
        snapctl restart test-snapd-service.test-snapd-service
        snapctl restart test-snapd-service.test-snapd-other-service
    else
        snapctl "$COMMAND" test-snapd-service.test-snapd-service
    fi
fi
sleep 3
