Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions build-linux/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ if [ "$1" = "configure" ]; then

pycompile -p pdagent

# If you install pdagent in a container without systemd,
# but remnants of systemd exist even though they won't
# be used, like with ubuntu, the install will fail.
# Particularly annoying when building Docker images.
# Setting PDAGENT_SKIP_SERVICE_START=yes gives user the
# option to not start service after install to avoid
# this problem.
if [[ -z "${PDAGENT_SKIP_SERVICE_START}" ]]; then
exit 0
fi

if which systemctl >/dev/null; then
install_systemd
else
Expand Down
11 changes: 11 additions & 0 deletions build-linux/rpm/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ chmod -R a+r $INSTALL_PATH/root_certs
# Compile module .py to .pyc
python -m compileall -q -f "$INSTALL_PATH/"

# If you install pdagent in a container without systemd,
# but remnants of systemd exist even though they won't
# be used, like with ubuntu, the install will fail.
# Particularly annoying when building Docker images.
# Setting PDAGENT_SKIP_SERVICE_START=yes gives user the
# option to not start service after install to avoid
# this problem.
if [[ -z "${PDAGENT_SKIP_SERVICE_START}" ]]; then
exit 0
fi

if which systemctl >/dev/null; then
install_systemd
else
Expand Down