def _run_hook(self, hook_name: str):
key = f"exec_{hook_name}"
value = self.config[key]
if value == "/usr/bin/true":
return
self.logger.verbose(
f"Running {hook_name} hook for {self.humanreadable_name}"
)
lex = shlex.shlex(value) # noqa: T484
lex.whitespace_split = True
command = list(lex)
return iocage.lib.helpers.exec(
command,
logger=self.logger,
env=self.env
)
评论列表
文章目录