#!/bin/bash
set -e
# Sandbox Chrome MUSI być setuid root – inaczej chrome odmawia startu
# komunikatem "The SUID sandbox helper binary was found, but is not
# configured correctly".
if [ -f /opt/google/chrome/chrome-sandbox ]; then
  chown root:root /opt/google/chrome/chrome-sandbox || true
  chmod 4755 /opt/google/chrome/chrome-sandbox || true
fi
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
  gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
fi
if command -v update-desktop-database >/dev/null 2>&1; then
  update-desktop-database -q || true
fi
if command -v update-mime-database >/dev/null 2>&1; then
  update-mime-database /usr/share/mime || true
fi

