some updates

This commit is contained in:
John Lancaster
2024-05-19 17:17:51 -05:00
parent ee7fa752bc
commit d45ba97a8f
5 changed files with 30 additions and 2 deletions

17
scripts/backup.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
DATA_DIR=$SCRIPT_DIR/data
ENV_FILE=$SCRIPT_DIR/.env
source $ENV_FILE
docker run -it --rm \
--hostname $HOSTNAME \
--env-file $ENV_FILE \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v $DATA_DIR:/data \
-v $RESTIC_REPO:/repo \
-e RESTIC_REPOSITORY=/repo \
restic/restic:latest "$@"

View File

@@ -6,7 +6,7 @@ REPO_DIR=$(dirname $SCRIPT_DIR)
COMPOSE_FILE=$REPO_DIR/docker-compose.yml
ENV_FILE=$REPO_DIR/.env
echo "Please the mosquitto password:"
echo "Please input 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