removed need for .env file
This commit is contained in:
@@ -7,9 +7,6 @@ Zigbee smarthome stack
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
1. Create `.env` file with `MOSQUITTO_PASSWORD`.
|
```
|
||||||
2. Run setup script
|
./scripts/setup.sh
|
||||||
|
```
|
||||||
```
|
|
||||||
./scripts/setup.sh
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -6,17 +6,8 @@ REPO_DIR=$(dirname $SCRIPT_DIR)
|
|||||||
COMPOSE_FILE=$REPO_DIR/docker-compose.yml
|
COMPOSE_FILE=$REPO_DIR/docker-compose.yml
|
||||||
ENV_FILE=$REPO_DIR/.env
|
ENV_FILE=$REPO_DIR/.env
|
||||||
|
|
||||||
if [ ! -f "$ENV_FILE" ]; then
|
echo "Please the mosquitto password:"
|
||||||
echo "Error: .env file not found."
|
read -s MOSQUITTO_PASSWORD
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
source "$ENV_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$MOSQUITTO_PASSWORD" ]; then
|
|
||||||
echo "MOSQUITTO_PASSWORD is not set. Exiting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker compose -f $COMPOSE_FILE run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $MOSQUITTO_PASSWORD
|
docker compose -f $COMPOSE_FILE run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $MOSQUITTO_PASSWORD
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user