diff --git a/README.md b/README.md index 2785308..a38cdcd 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,6 @@ Zigbee smarthome stack ## Setup -1. Create `.env` file with `MOSQUITTO_PASSWORD`. -2. Run setup script - - ``` - ./scripts/setup.sh - ``` +``` +./scripts/setup.sh +``` diff --git a/scripts/create_password.sh b/scripts/create_password.sh index 1c852eb..23ce53b 100755 --- a/scripts/create_password.sh +++ b/scripts/create_password.sh @@ -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