From c78456b789db6547b98305bfc0b3b15e4472926f Mon Sep 17 00:00:00 2001 From: f Date: Wed, 25 Aug 2021 18:15:34 -0300 Subject: [PATCH] Correr el servidor web --- haini.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/haini.sh b/haini.sh index c3a30a7..2d96cb8 100755 --- a/haini.sh +++ b/haini.sh @@ -177,14 +177,17 @@ crear_entorno() { test -f "$ENTORNO/etc/ssl/certs/sutty.local.crt" || generar_certificado } +DEFAULT="sh" + case $1 in - init) echo "export PATH=$DIR:\$PATH" ;; + init) echo "export PATH=$DIR:\$PATH" ; exit ;; + serve) shift; DEFAULT=nginx ;; *) if ! type "$SELF" >/dev/null 2>&1 ; then echo "Tip: Inicia haini.sh con 'eval \$($0 init)' para poder ejecutar con solo 'haini.sh'" >&2 fi - - crear_entorno - stdin=/dev/stdin correr "${*:-sh}" ;; esac + +crear_entorno +stdin=/dev/stdin correr "${*:-$DEFAULT}"