#!/usr/bin/env bash set -e # silence is golden. RUNNING=$(snapctl services | grep "${SNAP_NAME}" | wc -l) if [ ${RUNNING} -gt 0 ]; then snapctl restart "${SNAP_NAME}" fi