mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-17 10:29:00 +02:00
small enhancements
This commit is contained in:
@@ -46,10 +46,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2.5.0 #v2.4.1
|
uses: docker/setup-buildx-action@v2.5.0
|
||||||
# with:
|
|
||||||
# version: v0.10.3 # pin buildx version because of issue with ghcr.io (https://github.com/docker/build-push-action/issues/851)
|
|
||||||
|
|
||||||
- name: Login to DockerHub (buanet)
|
- name: Login to DockerHub (buanet)
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v2.1.0
|
||||||
with:
|
with:
|
||||||
@@ -68,7 +65,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node18/Dockerfile
|
file: ./debian/node18/Dockerfile
|
||||||
provenance: false
|
#provenance: false
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
|
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### v8.1.0-beta.1 (coming soon)
|
||||||
|
* enhance log output of maintenance script on restore ([#333](https://github.com/buanet/ioBroker.docker/issues/333))
|
||||||
|
* allow iobroker admin to be disabled at startup ([#332](https://github.com/buanet/ioBroker.docker/issues/332))
|
||||||
|
* allow deletion of objects and states db password with value "none" ([#306](https://github.com/buanet/ioBroker.docker/issues/306))
|
||||||
|
|
||||||
### v8.0.0 (20.03.2023)
|
### v8.0.0 (20.03.2023)
|
||||||
* update readme and docs
|
* update readme and docs
|
||||||
* remove manifests
|
* remove manifests
|
||||||
|
|||||||
18
debian/scripts/iobroker_startup.sh
vendored
18
debian/scripts/iobroker_startup.sh
vendored
@@ -352,10 +352,20 @@ else
|
|||||||
adminhostname=$(bash iobroker object get "$admininstance" --pretty | grep -oP '(?<="host": ")[^"]*')
|
adminhostname=$(bash iobroker object get "$admininstance" --pretty | grep -oP '(?<="host": ")[^"]*')
|
||||||
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin hostname is:" "$adminhostname"; fi
|
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin hostname is:" "$adminhostname"; fi
|
||||||
else
|
else
|
||||||
echo "There was a problem detecting the admin instance of your iobroker."
|
set +e
|
||||||
echo "Make sure the ioBroker installation you use has an admin instance or try again with a fresh installation and restore your configuration."
|
admininstance=$(bash iobroker list instances | grep 'disabled' | grep -m 1 -o 'system.adapter.admin..')
|
||||||
echo "For more details see https://docs.buanet.de/iobroker-docker-image/docs/#restore"
|
set -e
|
||||||
stop_on_error
|
if [[ "$admininstance" != "" ]]; then
|
||||||
|
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin instance is disabled."; fi
|
||||||
|
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin instance is:" "$admininstance"; fi
|
||||||
|
adminhostname=$(bash iobroker object get "$admininstance" --pretty | grep -oP '(?<="host": ")[^"]*')
|
||||||
|
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected admin hostname is:" "$adminhostname"; fi
|
||||||
|
else
|
||||||
|
echo "There was a problem detecting the admin instance of your iobroker."
|
||||||
|
echo "Make sure the ioBroker installation you use has an admin instance or try again with a fresh installation and restore your configuration."
|
||||||
|
echo "For more details see https://docs.buanet.de/iobroker-docker-image/docs/#restore"
|
||||||
|
stop_on_error
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# check hostname
|
# check hostname
|
||||||
if [[ "$adminhostname" != "" && "$adminhostname" != "$(hostname)" ]]; then
|
if [[ "$adminhostname" != "" && "$adminhostname" != "$(hostname)" ]]; then
|
||||||
|
|||||||
9
debian/scripts/maintenance.sh
vendored
9
debian/scripts/maintenance.sh
vendored
@@ -242,7 +242,16 @@ restore_iobroker() {
|
|||||||
#chown -R $setuid:$setgid /opt/iobroker/backup
|
#chown -R $setuid:$setgid /opt/iobroker/backup
|
||||||
|
|
||||||
echo -n "Restoring ioBroker... "
|
echo -n "Restoring ioBroker... "
|
||||||
|
set +e
|
||||||
bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1
|
bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1
|
||||||
|
return=$?
|
||||||
|
set -e
|
||||||
|
if [[ "$return" -ne 0 ]]; then
|
||||||
|
echo "Failed."
|
||||||
|
echo "For more details see \"/opt/iobroker/log/restore.log\"."
|
||||||
|
echo "Please check backup file location and permissions and try again."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
echo ' '
|
echo ' '
|
||||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||||
|
|||||||
16
debian/scripts/setup_iob_db.sh
vendored
16
debian/scripts/setup_iob_db.sh
vendored
@@ -99,7 +99,13 @@ set_objectsdb_port() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
set_objectsdb_pass() {
|
set_objectsdb_pass() {
|
||||||
if [[ "$objectsdbpass" != "$(jq -r '.objects.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then
|
if [[ "$objectsdbpass" == "none" ]]; then
|
||||||
|
echo "IOB_OBJECTSDB_PASS is available but value is set to \"none\"."
|
||||||
|
echo -n "Removing password of objects db... "
|
||||||
|
jq '.objects.options.auth_pass = null' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp
|
||||||
|
write_iobroker_json
|
||||||
|
echo 'Done.'
|
||||||
|
elif [[ "$objectsdbpass" != "$(jq -r '.objects.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then
|
||||||
echo "IOB_OBJECTSDB_PASS is available but value is different from detected ioBroker installation."
|
echo "IOB_OBJECTSDB_PASS is available but value is different from detected ioBroker installation."
|
||||||
echo -n "Setting password of objects db... "
|
echo -n "Setting password of objects db... "
|
||||||
jq --arg value "$objectsdbpass" '.objects.options.auth_pass = $value' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp
|
jq --arg value "$objectsdbpass" '.objects.options.auth_pass = $value' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp
|
||||||
@@ -188,7 +194,13 @@ set_statesdb_port() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
set_statesdb_pass() {
|
set_statesdb_pass() {
|
||||||
if [[ "$statesdbpass" != "$(jq -r '.states.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then
|
if [[ "$statesdbpass" == "none" ]]; then
|
||||||
|
echo "IOB_STATESDB_PASS is available but value is set to \"none\"."
|
||||||
|
echo -n "Removing password of states db... "
|
||||||
|
jq '.states.options.auth_pass = null' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp
|
||||||
|
write_iobroker_json
|
||||||
|
echo 'Done.'
|
||||||
|
elif [[ "$statesdbpass" != "$(jq -r '.states.options.auth_pass' /opt/iobroker/iobroker-data/iobroker.json)" ]]; then
|
||||||
echo "IOB_STATESDB_PASS is available but value is different from detected ioBroker installation."
|
echo "IOB_STATESDB_PASS is available but value is different from detected ioBroker installation."
|
||||||
echo -n "Setting password of states db... "
|
echo -n "Setting password of states db... "
|
||||||
jq --arg value "$statesdbpass" '.states.options.auth_pass = $value' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp
|
jq --arg value "$statesdbpass" '.states.options.auth_pass = $value' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user