#!/bin/bash
set -e

case "$1" in
    remove|purge|deconfigure)
        if command -v systemctl > /dev/null 2>&1; then
            systemctl stop syncserver.service 2>/dev/null || true
            systemctl disable syncserver.service 2>/dev/null || true
        fi
        ;;
    upgrade)
        ;;
    failed-upgrade)
        ;;
    *)
        exit 0
        ;;
esac

exit 0
