#!/bin/bash
if [ -d "/run/systemd/system" ]; then
systemctl --system daemon-reload >/dev/null || :
fi
case "$1" in
purge | 0)
userdel consul
;;
upgrade | [1-9]*)
systemctl try-restart consul.service >/dev/null || :
esac
exit 0