-
Notifications
You must be signed in to change notification settings - Fork 1
Organizing the logic of the install script. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Author: @fitorec <chanerec@gmail.com> Date: jue may 31 23:03:55 CDT 2012 Description: I fit into the logic functions of the install.sh script, I defined the variable XD so that the installation script can be run from outside the directory, for example: #Unzip the package tar -czf LogicalBricks-wicap-php-aae2b86.tar.gz #run install.sh sh LogicalBricks-wicap-php-aae2b86/install.sh ------------------------------------------------------------------------- install.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 93 insertions(+), 33 deletions(-)
Author: @fitorec <chanerec@gmail.com> Date: jue may 31 23:42:04 CDT 2012 Description: Using which program to get the path of the rrdtool. ------------------------------------------------------------------------- mkrrd.sh | 46 ++++++++++++++++++++++++++++------------------ 1 files changed, 28 insertions(+), 18 deletions(-)
|
Ya lo testeaste? |
|
Sí aunque con algunos detalles, tratare de explicarlos en el |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El primer detalle que tuve que para correrlo tenia que estar en el mismo directorio del guión install.sh, para esto declare la variable ${source}.
|
Bueno, aquí el detalle es que wicap-php es para openbsd. Ya que de base usa PF para realizar el ruteo. Voy a bajar tu código para realizar las pruebas en mi entorno con OpenBSD. Y te digo qué tal quedó... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aquí había un detalle, verán si ejecuto:
mkdir -p ./{var,bin,htdocs}Lo que me hace sh es que me crea un directorio llamado {var,bin,htdocs}, a diferencia de lo que hace bash o zh(no estoy del todo seguro de zh pero me parece que también lo hace).
|
Otro detalle, es que OpenBSD usa ksh. |
|
Un detalle adicional es que OpenBSD por seguridad pone "chrooteado" el apache, en el directorio /var/www |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aquí hay un detalle y es que previamente debe de existir el directorio ${basedir}/conf/ lo que hice fue crear el directorio y volver ejecutar el guión el cual se ejecuto correctamente.
Me queda mi duda si no es mejor idea el crear este directorio dentro de la función create_structure la cual quedaría como:
create_structure (){
echo "-> Creating '${dest}' structure"
(mkdir -p ${dest}/var && mkdir -p ${dest}/bin && mkdir -p ${dest}/htdocs && mkdir -p ${basedir}/conf )
if [ ${?} != 0 ]; then
echo "\n-> Error while creating the structure"
exit 1
fi
}¿Que opinan?, igual y estaría bien realizar el cambio antes de cualquier merge.
|
@fitorec wicap-php fue (y sigue siendo) desarrollado solo para OpenBSD por lo que su código solo toma en cuenta las características del mismo. En este momento el archivo |
|
Lo que escribí en mis comentarios anteriores respecto al script Chido 👍 reviso la doc. que me envías para tener el entorno, por lo pronto puedes correr tu propio test de la bifurcación, sin mas por aquí andamos. |
|
@fitorec, el wicap-php funciona bastante bien en OpenBSD sería cosa de que lo probaras, las dependencias con respecto a OpenBSD son bastantes, eso hace un poco difícil portarlo a alguna distribución GNU/Linux. Nuestro troll @nihilismus es un poco brusco para decir las cosas :P no lo tomes del todo en serio, jajajaja. Broma. Cuando gustes pasa a la oficina y te explico cómo funciona este desma. Saludos |
|
@hermes-logicalbricks @nihilismus No hay ningún problema 👅, comprendo que así es esto del SL, repente hago bifurcaciones sin ninguna intensión más que la de codear, es común que en mis solicitudes de empuje se genere discusión, aunque por lo regular evidencie mi impericia me agrada ya que también he aprendido bastante (x aquí en
Sí este @fervisa me dio sus coordenadas a ¿que horas salen a comer?, ¿comen por esos rumbos? e igual y podría pasar un o dos horas antes de la comida para platicar un rato e igual y los acompaño a mover el bigote. |
|
Pues salimos entre 2 y 3 de la tarde a comer. Ahí cuando gustes. |
I fit into the logic functions of the
install.shscript, I defined the variable${source}so that the installation script can be run from outside the directory, for example: