#!/bin/bash

if ! dotpi system_is_raspberry_pi &> /dev/null ; then
  echo "INFO: System is not a Raspberry Pi with dotpi: no uninstallation"
  # no error
  exit 0
fi

if [[ "$USER" != "root" ]]; then
  dotpi echo_error "This command must be run as root"
  exit 1
fi

service_name="dotpi-avahi-monitor.service"

dotpi echo_info "Uninstall ${service_name}"
dotpi service_uninstall "${service_name}"
