octavia/elements/amphora-agent/post-install.d/11-enable-amphora-agent-systemd
Michael Johnson c4408c4c78 Adds support for systemd amphora images
This patch enables auto-detection of the init system used in the
amphora image and adds support for systemd amphora.
This patch allows Ubuntu xenial amphora images to work.
It also merges two functional test files into one file to reduce
code duplication.

This is a scenario gate fix.

Change-Id: I5fec1680bd47719ae9f2fcb6abaaba8a78e2ae8b
Closes-Bug: #1640866
2016-11-16 00:42:37 +00:00

12 lines
169 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [[ -f /bin/systemctl ]]; then
/bin/systemctl enable amphora-agent
fi