#!/bin/bash
if [ "$1" = "purge" ]
then
userdel consul
fi
if [ "$1" == "upgrade" ] && [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
systemctl restart consul >/dev/null || true
exit 0