#!/bin/sh
# Upgrade (DSM runs this BEFORE replacing the package files):
# stop the running container so the switch to the new image is clean.
# postupgrade recreates it with the saved port/settings.
# Self-contained: the new package files may not be in place yet.
set -e
CONTAINER="kvmusic"
DOCKER="${SYNOPKG_PKGDEST}/tool/kv-helper"
if [ -x "${DOCKER}" ]; then
    "${DOCKER}" stop "${CONTAINER}" >/dev/null 2>&1 || true
fi
exit 0
