Skip to content

add options in base install#2

Open
asergiop21 wants to merge 7 commits intomasterfrom
add_base_installer
Open

add options in base install#2
asergiop21 wants to merge 7 commits intomasterfrom
add_base_installer

Conversation

@asergiop21
Copy link
Collaborator

No description provided.

@@ -1,11 +0,0 @@
deployer ALL= NOPASSWD: /bin/systemctl start unicorn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No lo borraría a eso, si vemos que el usuario está creado no lo metemos, caso contrario si.

dir_nginx=/etc/nginx

echo "Instalación Paquete NGINX"
#echo "Instalación Paquete NGINX"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todos estos echo comentados, los pasaría a comentarios normales y en inglés.

Comment on lines 12 to 25
while getopts u:p: option
do
case "${option}" in
u) user=${OPTARG};;
p) mawidabp_path=${OPTARG};;
:) echo "INVALID";;
\?) echo "Argumento -${option} erroneo use:
[u] Nombre de usuario
[p] Directorio de instalacion
"
exit;;

esac
done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esto se suele poner así:

while getopts u:p: option; do
  case $option in
  esac
done

Y el :) se le pone el mensaje "requiere un argumento". También se pone en eso dos casos un exit 1, así indicás error.


esac
done
shift $((OPTIND -1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Para qué hiciste esto?

Comment on lines 80 to 81
#adduser deployer -G nginx
#passwd deployer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acá haría lo que hablamos, todo esto en un if si no existe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants