Merge branch 'ent-13765-error-bad-substitution-en-instalacion-server-ubuntu-22-04' into 'develop'

Checkd lower and upper user aproval

See merge request artica/pandorafms!7407
This commit is contained in:
Jose Martin 2024-05-22 14:15:45 +00:00
commit aad2d92b95
1 changed files with 2 additions and 2 deletions

View File

@ -206,14 +206,14 @@ install () {
echo -e -n "Files from a previous installation were found in ${GREEN}/usr/lib/perl5/PandoraFMS/${NONE}. " echo -e -n "Files from a previous installation were found in ${GREEN}/usr/lib/perl5/PandoraFMS/${NONE}. "
read -p "That directory will be deleted in order to preserve integrity. Do you wish to proceed? (y/N): " USERAPPROVAL read -p "That directory will be deleted in order to preserve integrity. Do you wish to proceed? (y/N): " USERAPPROVAL
if [ "${USERAPPROVAL,,}" = "y" ]; then if [ "$USERAPPROVAL" = "y" ] || [ "$USERAPPROVAL" = "Y" ]; then
rm -rf "/usr/lib/perl5/PandoraFMS" rm -rf "/usr/lib/perl5/PandoraFMS"
echo -e "Previous PandoraFMS directory deleted successfully" echo -e "Previous PandoraFMS directory deleted successfully"
else else
echo -e -n "Files in ${GREEN}/usr/lib/perl5/PandoraFMS/${NONE} will not be deleted. This may cause issues. " echo -e -n "Files in ${GREEN}/usr/lib/perl5/PandoraFMS/${NONE} will not be deleted. This may cause issues. "
read -p "Do you want to proceed with the installation anyway? (y/N): " USERAPPROVAL read -p "Do you want to proceed with the installation anyway? (y/N): " USERAPPROVAL
if [ "${USERAPPROVAL,,}" = "y" ]; then if [ "$USERAPPROVAL" = "y" ] || [ "$USERAPPROVAL" = "Y" ]; then
echo "Proceeding with the installation anyway. This may cause problems in the future due to the existence of files from previous installations." echo "Proceeding with the installation anyway. This may cause problems in the future due to the existence of files from previous installations."
else else
echo "Installation aborted. You chose not to proceed." echo "Installation aborted. You chose not to proceed."