Use conmon pidfile in generated systemd unit as PIDFile.

By default, podman points PIDFile in generated unit file to non-existent
location. As a result, the unit file, generated by podman, is broken:
an attempt to start this unit without prior modification results in a crash,
because systemd can not find the pidfile of service's main process.

Fix the value of "PIDFile" and add a system test for this case.

Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
This commit is contained in:
Danila Kiver
2019-07-04 03:58:37 +03:00
parent f5593d305f
commit a54429cf87
6 changed files with 72 additions and 13 deletions

View File

@ -236,6 +236,17 @@ function skip_if_remote() {
skip "${1:-test does not work with podman-remote}"
}
#########################
# skip_if_not_systemd # ...with an optional message
#########################
function skip_if_not_systemd() {
if systemctl --user >/dev/null 2>&1; then
return
fi
skip "${1:-no systemd or daemon does not respond}"
}
#########
# die # Abort with helpful message
#########