Commit fd13ad84 authored by Cédric BRINER's avatar Cédric BRINER

cleanp_up: merge clean_up & clean_it

parent 61efa277
......@@ -69,21 +69,6 @@ function test_prerequesite
fi
}
function clean_up
{
pb "clean_up"
pb " - rm -fr /etc/unige_prod/ug-vmware/"
rm -fr /etc/unige_prod/ug-vmware/ | tab 3
pb " - rm -f /usr/local/bin/ug-master2instance"
rm -f /usr/local/bin/ug-master2instance
pb " - deluser --remove-home vmgars"
deluser --remove-home vmgars | tab 3
pb " - systemctl disable ssh"
systemctl disable ssh | tab 3
pb " - systemctl stop ssh"
systemctl stop ssh | tab 3
}
function change_hostname
{
......@@ -228,15 +213,19 @@ master-2-vm <new_hostname> <minion_id>\
EOF
}
function clean_it
function clean_up
{
pb "close_it"
pb " - rm /usr/local/bin/ug-master2instance"
rm /usr/local/bin/ug-master2instance
# pb " - disable ssh."
# systemctl disable ssh | tab 3
# pb " - stop ssh."
# systemctl stop ssh | tab 3
pb "clean_up"
pb " - rm -fr /etc/unige_prod/ug-vmware/"
rm -fr /etc/unige_prod/ug-vmware/ | tab 3
pb " - rm -f /usr/local/bin/ug-master2instance"
rm -f /usr/local/bin/ug-master2instance
pb " - systemctl disable ssh"
systemctl disable ssh | tab 3
pb " - systemctl stop ssh"
systemctl stop ssh | tab 3
pb " - deluser --remove-home vmgars"
deluser --remove-home vmgars | tab 3
}
new_hostname="$1"
......@@ -251,12 +240,10 @@ lip_dns="$9"
test_prerequesite
echo ""
clean_up
echo ""
change_hostname
echo ""
change_vg_name
echo ""
change_network
echo ""
clean_it
clean_up
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment