echo -e "Checking whether systemd units need to be reload..."
if [[ $(systemctl show udisks2 --property=NeedDaemonReload | cut -d= -f2) == "yes" ]]; then
    echo "Reloading systemd units ..."
    systemctl daemon-reload
else
    echo "Nothing needs reloading."
fi

echo "Restarting udisks2 service ..."
systemctl try-restart udisks2
