#!/bin/bash

FILE="/exec/alertClient"

echo "removing $FILE ..."

if [ -e "$FILE" ]; then
        echo "deleting $FILE"
        rm "$FILE"
fi
echo "$FILE has been removed...getting new file"

wget -O "$FILE" https://dl.lionpowerusa.com/sms/docker/exec/alertClient -P $FILE
chmod +x "$FILE"

echo "Attempting to execute $FILE $@"
exec $FILE "$@"
