script updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cleanup_except() {
|
cleanup_except() {
|
||||||
@@ -22,9 +23,8 @@ cleanup_except() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
|
readonly SCRIPT_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
|
||||||
REPO_DIR=$(dirname $SCRIPT_DIR)
|
readonly REPO_DIR=$(cd $(dirname $SCRIPT_DIR) && pwd)
|
||||||
alias compose="compose -f $REPO_DIR/docker-compose.yml"
|
|
||||||
|
|
||||||
docker compose down
|
docker compose down
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
|
readonly SCRIPT_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
|
||||||
REPO_DIR=$(dirname $SCRIPT_DIR)
|
readonly REPO_DIR=$(cd $(dirname $SCRIPT_DIR) && pwd)
|
||||||
alias compose="compose -f $REPO_DIR/docker-compose.yml"
|
|
||||||
|
|
||||||
echo "Please input the mosquitto password:"
|
echo "Please input the mosquitto password:"
|
||||||
read -s MOSQUITTO_PASSWORD
|
read -s MOSQUITTO_PASSWORD
|
||||||
|
|
||||||
docker compose run -it --rm mqtt mosquitto_passwd -b -c /mosquitto/config/pwfile homeassistant $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
|
echo "password: $MOSQUITTO_PASSWORD" > $REPO_DIR/zigbee2mqtt/secret.yaml
|
||||||
chmod 600 $REPO_DIR/zigbee2mqtt/secret.yaml
|
chmod 600 $REPO_DIR/zigbee2mqtt/secret.yaml
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
python -m restic.forget \
|
python -m restic.forget \
|
||||||
--keep-last 5 \
|
--keep-last 5 \
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
|
readonly SCRIPT_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
|
||||||
REPO_DIR=$(dirname $SCRIPT_DIR)
|
readonly REPO_DIR=$(cd $(dirname $SCRIPT_DIR) && pwd)
|
||||||
|
|
||||||
$SCRIPT_DIR/clear_data.sh
|
$SCRIPT_DIR/clear_data.sh
|
||||||
$SCRIPT_DIR/create_password.sh
|
$SCRIPT_DIR/create_password.sh
|
||||||
|
|
||||||
alias compose="compose -f $REPO_DIR/docker-compose.yml"
|
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user