#!/bin/sh -e

APP="storage"

case "$1" in
    remove|purge)
        if [ -f /etc/init/mega-graphite-${APP}.conf ] ; then
            if ! /usr/bin/service mega-graphite-${APP} stop ; then
                echo "Cannot stop ${APP} service!"
            fi
        fi
    ;;
esac
