@@ -24,16 +24,16 @@ if ! $CONTRIB_DIR/check-deis-deps.sh; then
2424fi
2525
2626# connection details for using digital ocean's API
27- client_id=$( knife exec -E" puts Chef::Config[:knife][:digital_ocean_client_id]" )
28- api_key=$( knife exec -E" puts Chef::Config[:knife][:digital_ocean_api_key]" )
27+ client_id=${DIGITALOCEAN_CLIENT_ID :- $ (knife exec -E" puts Chef::Config[:knife][:digital_ocean_client_id]" )}
28+ api_key=${DIGITALOCEAN_API_KEY :- $ (knife exec -E" puts Chef::Config[:knife][:digital_ocean_api_key]" )}
2929
3030# Check that client ID and API key was set
3131if test -z $client_id ; then
32- echo " Please add your client id to ${knife_file} ."
32+ echo " Please add your Digital Ocean Client ID to the shell's environment or knife.rb ."
3333fi
3434
3535if test -z $api_key ; then
36- echo " Please add your api key to ${knife_file} ."
36+ echo " Please add your Digital Ocean API Key to the shell's environment or knife.rb ."
3737fi
3838
3939# ################
@@ -122,9 +122,9 @@ if [ $result -ne 0 ]; then
122122 knife digital_ocean droplet destroy -S $droplet_id
123123 # Remove node and client from Chef Server
124124 echo_color " Deleting Chef client..."
125- knife client delete deis-controller
125+ knife client delete deis-controller -y
126126 echo_color " Deleting Chef node..."
127- knife node delete deis-controller
127+ knife node delete deis-controller -y
128128else
129129 echo_color " Knife bootstrap successful."
130130 # Need Chef admin permission in order to add and remove nodes and clients
0 commit comments