do_setcap() {
  setcap cap_sys_admin+p $(readlink -f $(which sunshine))
}

do_udev_reload() {
  udevadm control --reload-rules
  udevadm trigger --property-match=DEVNAME=/dev/uinput
  modprobe uinput || true
}

post_install() {
  do_setcap
  do_udev_reload
}

post_upgrade() {
  do_setcap
  do_udev_reload
}

