#!/usr/bin/env bash
set -e

APP=stern

# If runit symlink exists for $APP, stop the service and remove the link.
[[ -L /etc/service/$APP ]] && sv down $APP && rm /etc/service/$APP && sleep 5 || exit 0
