echo"please enter(command) which editor you want to use for editing this file"
echo"Please enter which editor (command) you want to use for editing this file"
read-p"[vi] : " EDITOR
EDITOR=${EDITOR:-vi}
if[[($EDITOR="vi")||$EDITOR="vim"]];then
...
...
@@ -27,14 +27,14 @@ case $MODIFY in
echo"Instruction: "
echo-e"\t 1. press i to edit file"
echo-e"\t 2. modify file based on your needs"
echo-e"\t 3. to save changes use followng sequence: 'Esc : wq' and press enter"
echo"to discurd changes, use: 'Esc : q!' and press enter"
echo-e"\t 3. to save changes use following sequence: 'Esc : wq' and press enter"
echo"to discard changes, use: 'Esc : q!' and press enter"
read-p"press enter to continue ..." CONTINUE
$EDITOR access.ips
else
echo"$EDITOR not found. install it and start over"
exit 1
fi
exit 1
fi
else
if`which $EDITOR> /dev/null 2>&1`;then
$EDITOR access.ips
...
...
@@ -48,34 +48,38 @@ case $MODIFY in
echo no
;;
*)
echo"Unknown answer, not modifing access rules!"
echo"Unknown answer, not modifying access rules!"
;;
esac
./generate_haproxy_whitelis_files.sh
./generate_haproxy_whitelist_files.sh
if[$?-gt 0 ];then
echo"error occured, please check access.ips file structure. lines starting with '###' should not be modified"
echo"Error occurred, please check access.ips file structure. lines starting with '###' should not be modified"
exit 1
else
echo"access restrictions configured successfully"
echo"Access restrictions configured successfully"
echo""
fi
if[-f group_vars/all/variables.yml ];then
echo"Variables file (group_vars/all/variables.yml) is configure manually. please take a look if everything is correct and move to next step"
echo"Variables file (group_vars/all/variables.yml) is already configured manually. Please take a look if everything is correct and move to the next step"
echo"We have configured for you following config files: access.ips, group_vars/all/variables.yml and we have also generated HAProxy Access Control Lists in the following directory: roles/haproxy/files"
echo"We have configured for you the following config files: access.ips, group_vars/all/variables.yml and we have also generated HAProxy Access Control Lists in the following directory: roles/haproxy/files"
echo""
echo"move to next command to deploy the soctools cluster."