From 9b542ef9a12ea66a769723718711d7dc0267a3f8 Mon Sep 17 00:00:00 2001 From: Nathan Cerny Date: Tue, 28 May 2019 16:02:04 -0500 Subject: Update Habitat Build with license acceptance and make package more flexible. Signed-off-by: Nathan Cerny --- habitat/hooks/run | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'habitat/hooks') diff --git a/habitat/hooks/run b/habitat/hooks/run index 75dd1958fa..5016e612d9 100644 --- a/habitat/hooks/run +++ b/habitat/hooks/run @@ -3,4 +3,10 @@ exec 2>&1 export SSL_CERT_FILE="{{pkgPathFor "core/cacerts"}}/ssl/cert.pem" -exec chef-solo --fork -c {{pkg.svc_config_path}}/client.rb +if [[ -z "{{cfg.config_path}}" ]]; then + CLIENT_CONFIG="{{pkg.svc_config_path}}/client.rb" +else + CLIENT_CONFIG="{{cfg.config_path}}/client.rb" +fi + +exec chef-client --fork -c ${CLIENT_CONFIG}/client.rb --chef-license {{cfg.chef_license}} -- cgit v1.2.1