From 3640326a26ce395aa588870c84c0c155c2f70a36 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 26 Jun 2018 14:44:03 +0100 Subject: [PATCH] put seccomp_profile_path into variable and try catch --- services/clsi/config/settings.defaults.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/clsi/config/settings.defaults.coffee b/services/clsi/config/settings.defaults.coffee index ced53a917f..901637cdf6 100644 --- a/services/clsi/config/settings.defaults.coffee +++ b/services/clsi/config/settings.defaults.coffee @@ -40,7 +40,12 @@ if process.env["DOCKER_RUNNER"] user: process.env["TEXLIVE_IMAGE_USER"] or "tex" expireProjectAfterIdleMs: 24 * 60 * 60 * 1000 checkProjectsIntervalMs: 10 * 60 * 1000 - seccomp_profile: JSON.stringify(JSON.parse(require("fs").readFileSync(Path.resolve(__dirname + "/../seccomp/clsi-profile.json")))) + + try + seccomp_profile_path = Path.resolve(__dirname + "/../seccomp/clsi-profile.json") + module.exports.clsi.seccomp_profile = JSON.stringify(JSON.parse(require("fs").readFileSync(seccomp_profile_path))) + catch + console.log "could not load seccom profile from #{seccomp_profile_path}" module.exports.path.synctexBaseDir = -> "/compile"