script updates
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
|
||||
REPO_DIR=$(dirname $SCRIPT_DIR)
|
||||
alias compose="compose -f $REPO_DIR/docker-compose.yml"
|
||||
readonly SCRIPT_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
|
||||
readonly REPO_DIR=$(cd $(dirname $SCRIPT_DIR) && pwd)
|
||||
|
||||
echo "Please input the mosquitto password:"
|
||||
read -s MOSQUITTO_PASSWORD
|
||||
|
||||
docker compose run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $MOSQUITTO_PASSWORD
|
||||
|
||||
chown root:root $REPO_DIR/mosquitto/config/pwfile
|
||||
|
||||
echo "password: $MOSQUITTO_PASSWORD" > $REPO_DIR/zigbee2mqtt/secret.yaml
|
||||
chmod 600 $REPO_DIR/zigbee2mqtt/secret.yaml
|
||||
|
||||
Reference in New Issue
Block a user