QVolution2019.2/sleeper_agents_aom_engine/reporter/incoming/test.sh

15 lines
515 B
Bash
Executable File

#! /bin/bash
SLACK_API_TOKEN=${SLACK_API_TOKEN:-}
if [ -z "$SLACK_API_TOKEN" ]; then
SLACK_API_TOKEN=$(security find-generic-password -a $USER -s SLACK_API_TOKEN -w 2> /dev/null)
if [ -z "$SLACK_API_TOKEN" ]; then
read -s -p "Enter SLACK_API_TOKEN" SLACK_API_TOKEN
echo ""
fi
fi
security delete-generic-password -a $USER -s SLACK_API_TOKEN 2> /dev/null 1>&2
security add-generic-password -a $USER -s SLACK_API_TOKEN -w $SLACK_API_TOKEN 1>&2
SLACK_BOT_TOKEN=$SLACK_API_TOKEN python3 ./main.py