summaryrefslogtreecommitdiff
path: root/habitat/hooks
diff options
context:
space:
mode:
authorNathan Cerny <ncerny@gmail.com>2019-05-28 16:02:04 -0500
committerNathan Cerny <ncerny@gmail.com>2019-05-28 16:02:04 -0500
commit9b542ef9a12ea66a769723718711d7dc0267a3f8 (patch)
tree9b74207e17de19bf6436d9d822fdd6e760b015b5 /habitat/hooks
parentcc6c31616126c38d93dafd1f0475ac3ae5815a65 (diff)
downloadchef-9b542ef9a12ea66a769723718711d7dc0267a3f8.tar.gz
Update Habitat Build with license acceptance and make package more flexible.
Signed-off-by: Nathan Cerny <ncerny@gmail.com>
Diffstat (limited to 'habitat/hooks')
-rw-r--r--habitat/hooks/run8
1 files changed, 7 insertions, 1 deletions
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}}