From b91d6cd875de25ca9f984d9ce6f1f10654b86c81 Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 11 Nov 2013 13:46:27 -0500 Subject: [PATCH] clean the chef-server data and stop the chef-server before uninstall the chef-server --- xCAT/postscripts/install_chef_server | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/install_chef_server b/xCAT/postscripts/install_chef_server index 2a1728678..7af79efa4 100755 --- a/xCAT/postscripts/install_chef_server +++ b/xCAT/postscripts/install_chef_server @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh # IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html ##################################################### #=head1 install_chef_server @@ -50,10 +50,16 @@ fi if [ "$os" == "ubuntu" ]; then #remove the old chef-server and the configuration files + HOME='/root/' + export HOME + /usr/bin/chef-server-ctl cleanse > /dev/null 2>&1 + /usr/bin/chef-server-ctl stop > /dev/null 2>&1 + /usr/bin/chef-server-ctl status > /dev/null 2>&1 apt-get -y autoremove --purge chef-server rm -rf /etc/chef-server rm -rf /etc/chef rm -rf /root/.chef + rm -rf /opt/chef-server/ #add the internet Ubuntu repositories #urelease="precise" #default release name