Skip to content

Commit

Permalink
Allow disabling apparmor via environment variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Mar 21, 2020
1 parent db9fac0 commit cf5a020
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opencpu-server/rapache/onstartup.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ unix:::set_interactive(FALSE)
options(rapache = TRUE)

#Check if AppArmor is available
if(identical(unix::aa_config()$con, "unconfined")){
if(nchar(Sys.getenv("OCPU_DISABLE_APPAROR"))){
cat("AppArmor has been disabled!\n")
} else if(identical(unix::aa_config()$con, "unconfined")){
options(apparmor = TRUE)
cat("AppArmor available! Running OpenCPU with security profile and rlimits.\n")
} else {
Expand Down

0 comments on commit cf5a020

Please sign in to comment.