Sha256: 4d9b77b72d51b7c95f2bf414804b33427ae1042a055581b787f87b0f16370359
Contents?: true
Size: 1007 Bytes
Versions: 4
Compression:
Stored size: 1007 Bytes
Contents
#!/bin/sh # Detiene servicio if (test -f ".env") then { . .env } fi; if (test "$RC" = "") then { echo "Falta RC en .env" exit 1 } fi; if (test "$RAILS_ENV" = "production") then { if (test ! -f /etc/rc.d/$RC) then { echo "Falta script /etc/rc.d/$RC" exit 1; } fi; doas sh /etc/rc.d/$RC -d stop } elif (test "$RAILS_ENV" = "development") then { # Intentando detener rails if (test -f tmp/pids/server.pid) then { pp=`cat tmp/pids/server.pid` ps -p $pp | grep "ruby: puma" > /dev/null if (test "$?" = "0") then { # Proceso activo y con ruby y puma seguramente es el de este echo "Matando proceso con rails $pp" kill -9 $pp } fi; } fi; # Intentand detener proceso de recarga viva pn=`fstat | grep $PUERTORECVIVA | sed -e "s/^[^\s]* node *\([0-9][0-9]*\) .*/\1/g" | sort -u` if (test "$pn" != "") then { echo "Matando proceso con node $pn" kill -9 $pn } fi; } fi; if (test -f "bin/detiene-local") then { . bin/detiene-local; } fi;
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
msip-2.2.0.beta1 | test/dummy/bin/detiene |
msip-2.2.0.alfa3 | test/dummy/bin/detiene |
msip-2.2.0.alfa2 | test/dummy/bin/detiene |
msip-2.2a2 | test/dummy/bin/detiene |