Skip to content

Commit

Permalink
Fix vars
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaspcs committed Apr 12, 2023
1 parent d5fbe03 commit 006796c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ env | grep PING_
env | grep INFLUXDB_
env | grep NOTIFY_

# force setup of InfluxDB Vars
export INFLUXDB_BUCKET=${INFLUXDB_BUCKET:-telepinger-no-bucket}
export INFLUXDB_ORG=${INFLUXDB_ORG:-telepinger}
export INFLUXDB_TOKEN=${INFLUXDB_TOKEN:-telepinger}
export INFLUXDB_URL=${INFLUXDB_URL:-http://localhost:8086}

# Set up the cron job
echo "*/$MINUTES_INTERVAL * * * * /usr/local/bin/python /app/telepinger.py -c $PING_PACKETS -i $PING_INTERVAL $PING_HOST > /proc/1/fd/1 2>&1" | crontab -
crontab -l
Expand Down
2 changes: 2 additions & 0 deletions telepinger.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
notify_always = os.environ.get('NOTIFY_ALWAYS', 'True')
notify_always = notify_always.lower() in ['true', '1', 'yes']

print(f'Bucket: {bucket}')

hostname = socket.gethostname()

os_name = platform.system()
Expand Down

0 comments on commit 006796c

Please sign in to comment.