octavia/elements/certs-ramfs/post-install.d/30-enable-certs-ramfs-service
Bernard Cafarelli 0dd4649f37 Use cryptsetup/LUKS for encrypted ramfs
ecryptfs was dropped from RHEL/CentOS, use LUKS on a RAM-backed block
device (brd) instead.

Made the element name more generic

Added systemctl enable call in postinstall (for systemd init), so that
the service is correctly started and listed as wanted by amphora-agent

Change-Id: Id8c7ff93ae244ef14480e22c85dc79355a902105
Closes-Bug: #1642982
Closes-Bug: #1662952
2017-02-14 10:37:45 +00:00

22 lines
353 B
Bash
Executable File

#!/bin/bash
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
case "$DIB_INIT_SYSTEM" in
upstart|sysv)
# nothing to do
exit 0
;;
systemd)
systemctl enable certs-ramfs.service
;;
*)
echo "Unsupported init system $DIB_INIT_SYSTEM"
exit 1
;;
esac