removed need for .env file

This commit is contained in:
root
2023-11-17 10:58:21 -06:00
parent 070ecf778a
commit 5ceae952a1
2 changed files with 5 additions and 17 deletions

View File

@@ -7,9 +7,6 @@ Zigbee smarthome stack
## Setup
1. Create `.env` file with `MOSQUITTO_PASSWORD`.
2. Run setup script
```
./scripts/setup.sh
```

View File

@@ -6,17 +6,8 @@ REPO_DIR=$(dirname $SCRIPT_DIR)
COMPOSE_FILE=$REPO_DIR/docker-compose.yml
ENV_FILE=$REPO_DIR/.env
if [ ! -f "$ENV_FILE" ]; then
echo "Error: .env file not found."
exit 1
else
source "$ENV_FILE"
fi
if [ -z "$MOSQUITTO_PASSWORD" ]; then
echo "MOSQUITTO_PASSWORD is not set. Exiting."
exit 1
fi
echo "Please the mosquitto password:"
read -s MOSQUITTO_PASSWORD
docker compose -f $COMPOSE_FILE run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $MOSQUITTO_PASSWORD