Instead of pkexecing everytime we check if we have CAP_SYS_RESOURCE and then just do it directly. If we don't have it, we try to set it with pkexec.