#include <tunables/global>

@{xdg_data_home}=@{HOME}/.local/share

profile postgresql_akonadi {
  #include <abstractions/base>
  #include <abstractions/user-tmp>

  capability setgid,
  capability setuid,

  /etc/passwd r,
  /{usr/,}bin/dash mrix,
  /{usr/,}bin/locale mrix,
  /usr/lib/postgresql/*/bin/initdb mrix,
  /usr/lib/postgresql/*/bin/pg_ctl mrix,
  /usr/lib/postgresql/*/bin/postgres mrix,
  /usr/share/postgresql/** r,
  owner /dev/shm/PostgreSQL.* rw,
  owner @{xdg_data_home}/akonadi/** rwlk,
  owner @{xdg_data_home}/akonadi/db_data/** l,
}
