Skip to content

Commit

Permalink
3 .sh files: Change shebang to simply /bin/sh
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengtuggy committed Jul 20, 2024
1 parent 23d4c46 commit 39f615b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions app/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh

# Abort the entire script if an error occurs
set -e

Expand Down
4 changes: 3 additions & 1 deletion app/pg_dump.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
PGPASSWORD="$JOB_HISTORY_DB_PASSWORD" pg_dump --file=backup_to_restore.sql --format=p --clean --encoding=utf8 --if-exists --dbname=$JOB_HISTORY_DB_NAME --host=$JOB_HISTORY_DB_HOST --port=$JOB_HISTORY_DB_PORT --username=$JOB_HISTORY_DB_USERNAME
#!/bin/sh

PGPASSWORD="$JOB_HISTORY_DB_PASSWORD" pg_dump --file=backup_to_restore.sql --format=p --clean --encoding=utf8 --if-exists --dbname="$JOB_HISTORY_DB_NAME" --host="$JOB_HISTORY_DB_HOST" --port=$JOB_HISTORY_DB_PORT --username="$JOB_HISTORY_DB_USERNAME"

Check failure

Code scanning / Secrets Audit

Cleartext Storage of Sensitive Information. Error

Credential in plaintext? Rule: Env Var
Line: PGPASSWORD="$JOB_HISTORY_DB_PASSWORD" pg_dump --file=backup_to_restore.sql --format=p --clean --encoding=utf8 --if-exists --dbname="$JOB_HISTORY_DB_NAME" --host="$JOB_HISTORY_DB_HOST" --port=$JOB_HISTORY_DB_PORT --username="$JOB_HISTORY_DB_USERNAME" Commit: .
12 changes: 7 additions & 5 deletions app/tcp-port-wait.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/sh

set -e

if [ -z "$1" -o -z "$2" ]
if [ -z "$1" ] || [ -z "$2" ]
then
echo "tcp-port-wait - block until specified TCP port becomes available"
echo "Usage: ntcp-port-wait HOST PORT"
echo "Usage: tcp-port-wait HOST PORT"
exit 1
fi
echo Waiting for port $1:$2 to become available...
while ! nc -z $1 $2 2>/dev/null
echo Waiting for port "$1":$2 to become available...
while ! nc -z "$1" $2 2>/dev/null
do
let elapsed=elapsed+1
elapsed=$elapsed+1
if [ "$elapsed" -gt 90 ]
then
echo "TIMED OUT !"
Expand Down

0 comments on commit 39f615b

Please sign in to comment.