summaryrefslogtreecommitdiff
path: root/subplot
diff options
context:
space:
mode:
authorAlexander Batischev <eual.jp@gmail.com>2020-10-18 00:38:22 +0300
committerAlexander Batischev <eual.jp@gmail.com>2020-10-18 19:56:28 +0300
commit36a6733581e77cf167107a9ac638ece1100fb1b3 (patch)
treec2d1605d2a094f1e71a25d4b9eff84c5716d647f /subplot
parentf6f41ad2e50dcb487b254655ee1399fde81b9853 (diff)
downloadobnam2-36a6733581e77cf167107a9ac638ece1100fb1b3.tar.gz
chore: make ./check run on Debian bullseye
Debian bullseye (which is the current testing branch) installs `daemonize` to /usr/bin rather than /usr/sbin: https://salsa.debian.org/alvinch_chen-guest/daemonize/-/commit/4cfa62a019599c1e96c702052e912d1642a256ac
Diffstat (limited to 'subplot')
-rw-r--r--subplot/daemon.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/subplot/daemon.py b/subplot/daemon.py
index c6285bf..4d60fd0 100644
--- a/subplot/daemon.py
+++ b/subplot/daemon.py
@@ -14,6 +14,7 @@ def start_daemon(ctx, name, argv):
runcmd_exit_code_is = globals()["runcmd_exit_code_is"]
runcmd_get_exit_code = globals()["runcmd_get_exit_code"]
runcmd_get_stderr = globals()["runcmd_get_stderr"]
+ runcmd_prepend_to_path = globals()["runcmd_prepend_to_path"]
logging.debug(f"Starting daemon {name}")
logging.debug(f" ctx={ctx.as_dict()}")
@@ -28,10 +29,13 @@ def start_daemon(ctx, name, argv):
"stderr": f"{name}.stderr",
"stdout": f"{name}.stdout",
}
+ # Debian up to 10 installs `daemonize` to /usr/sbin, which isn't part of
+ # the minimal environment that Subplot sets up.
+ runcmd_prepend_to_path(ctx, "/usr/sbin")
runcmd_run(
ctx,
[
- "/usr/sbin/daemonize",
+ "daemonize",
"-c",
os.getcwd(),
"-p",