No env bash

This commit is contained in:
Torsten Raudssus 2023-06-25 21:41:05 +02:00
parent 39d1de1c9d
commit 3a5cef10ed

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/bash
export IP=$( hostname -i ) export IP=$( hostname -i )
@ -9,13 +9,10 @@ if [[ ! -d "node_modules" ]]; then
fi fi
fi fi
if [[ -z "$@" ]] if [[ -z "$@" ]]; then
then if [[ -f "package.json" ]]; then
if [[ -f "package.json" ]]
then
PACKAGE_JSON_START=$( cat package.json | jq -r '.scripts.start // empty' ) PACKAGE_JSON_START=$( cat package.json | jq -r '.scripts.start // empty' )
if [[ -z "$PACKAGE_JSON_START" ]] if [[ -z "$PACKAGE_JSON_START" ]]; then
then
echo "package.json found, but no start script, starting bash..." echo "package.json found, but no start script, starting bash..."
exec bash exec bash
else else