mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-23 13:15:33 +02:00
Merge branch 'main' into v7.2.0-beta.1
This commit is contained in:
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: ioBroker Docker image discussions
|
||||||
|
url: https://github.com/buanet/ioBroker.docker/discussions
|
||||||
|
# about: You can ask your questions here.
|
||||||
|
- name: ioBroker Community Forum
|
||||||
|
url: https://forum.iobroker.net/
|
||||||
|
- name: ioBroker Discord channel
|
||||||
|
url: https://discord.gg/Ne3y6fUac3
|
||||||
|
- name: ioBroker Facebook group
|
||||||
|
url: https://www.facebook.com/groups/440499112958264/
|
||||||
17
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
17
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: Feature Request
|
||||||
|
description: I want to request a new feature.
|
||||||
|
title: "[Feature Request]: "
|
||||||
|
labels: "enhancement"
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to give us your feedback!
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Please describe your request.
|
||||||
|
placeholder: Waht are your ideas?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
32
.github/ISSUE_TEMPLATE/problem_report.yaml
vendored
Normal file
32
.github/ISSUE_TEMPLATE/problem_report.yaml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Problem Report
|
||||||
|
description: I want to report a problem.
|
||||||
|
title: "[Problem]: "
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Please describe your problem.
|
||||||
|
placeholder: What happened? What did you expect?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Image version
|
||||||
|
description: Which image version do you use?
|
||||||
|
placeholder: v1.2.3
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: Docker logs
|
||||||
|
description: Please provide the full Docker log output from your Docker container startup.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
@@ -6,6 +6,9 @@
|
|||||||
* add env IOB_BACKITUP_EXTDB to unlock external db backups in backitup adapter
|
* add env IOB_BACKITUP_EXTDB to unlock external db backups in backitup adapter
|
||||||
* reorder dockerfile steps to fulfill ioBroker Docker check
|
* reorder dockerfile steps to fulfill ioBroker Docker check
|
||||||
|
|
||||||
|
### v7.1.2 (08.11.2022)
|
||||||
|
* fix hostname check ([#293](https://github.com/buanet/ioBroker.docker/issues/293))
|
||||||
|
|
||||||
### v7.1.1 (01.11.2022)
|
### v7.1.1 (01.11.2022)
|
||||||
* fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289))
|
* fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289))
|
||||||
|
|
||||||
|
|||||||
83
debian/scripts/iobroker_startup.sh
vendored
83
debian/scripts/iobroker_startup.sh
vendored
@@ -30,6 +30,20 @@ set -u
|
|||||||
|
|
||||||
pkill_timeout=10 # timeout for iobroker shutdown in seconds
|
pkill_timeout=10 # timeout for iobroker shutdown in seconds
|
||||||
|
|
||||||
|
# Stop on error function
|
||||||
|
stop_on_error() {
|
||||||
|
if [[ "$debug" == "true" ]]; then
|
||||||
|
echo ' '
|
||||||
|
echo "[DEBUG] Debug mode prevents the container from exiting on errors."
|
||||||
|
echo "[DEBUG] This enables you to investigate or fix your issue on the command line."
|
||||||
|
echo "[DEBUG] If you want to stop or restart your container you have to do it manually."
|
||||||
|
echo "[DEBUG] IoBroker is not running!"
|
||||||
|
tail -f /dev/null
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Getting date and time for logging
|
# Getting date and time for logging
|
||||||
dati=`date '+%Y-%m-%d %H:%M:%S'`
|
dati=`date '+%Y-%m-%d %H:%M:%S'`
|
||||||
|
|
||||||
@@ -120,7 +134,7 @@ if [[ -f /opt/.firstrun ]]; then
|
|||||||
if [[ "$packages" != "" && "$offlinemode" = "true" ]]; then
|
if [[ "$packages" != "" && "$offlinemode" = "true" ]]; then
|
||||||
echo 'PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation.'
|
echo 'PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation.'
|
||||||
echo ' '
|
echo ' '
|
||||||
else
|
elif [[ "$packages" != "" ]]; then
|
||||||
echo 'PACKAGES is set. Installing additional Linux packages.'
|
echo 'PACKAGES is set. Installing additional Linux packages.'
|
||||||
echo "Checking the following packages:" $packages"..."
|
echo "Checking the following packages:" $packages"..."
|
||||||
echo $packages > /opt/scripts/.docker_config/.packages
|
echo $packages > /opt/scripts/.docker_config/.packages
|
||||||
@@ -176,9 +190,7 @@ elif [[ "$(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l)" != "0" && "$(tar -z
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "IoBroker backup file detected in /opt/iobroker."
|
echo "IoBroker backup file detected in /opt/iobroker."
|
||||||
if [[ "$debug" == "true" ]]; then
|
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz); fi
|
||||||
echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz)
|
|
||||||
fi
|
|
||||||
echo -n "Preparing restore... "
|
echo -n "Preparing restore... "
|
||||||
mv /opt/iobroker/*.tar.gz /opt/
|
mv /opt/iobroker/*.tar.gz /opt/
|
||||||
tar -xf /opt/initial_iobroker.tar -C /
|
tar -xf /opt/initial_iobroker.tar -C /
|
||||||
@@ -239,34 +251,39 @@ echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... "
|
|||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
# checking hostname in ioBroker to match container hostname
|
# hostname check
|
||||||
if [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" != "$(hostname)" && "$multihost" != "slave" ]]; then
|
if [[ "$multihost" == "slave" ]]; then
|
||||||
echo "Hostname in ioBroker does not match the hostname of this container."
|
|
||||||
if [[ "$debug" == "true" ]]; then
|
|
||||||
echo "[DEBUG] Detected hostname in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
|
|
||||||
echo "[DEBUG] Detected hostname in container: " $(hostname)
|
|
||||||
fi
|
|
||||||
echo -n "Updating hostname to "$(hostname)"... "
|
|
||||||
bash iobroker host $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
|
|
||||||
echo 'Done.'
|
|
||||||
echo ' '
|
|
||||||
elif [[ "$multihost" == "slave" ]]; then
|
|
||||||
echo "IOB_MULTIHOST ist set to \"slave\". Hostname check will be skipped."
|
echo "IOB_MULTIHOST ist set to \"slave\". Hostname check will be skipped."
|
||||||
echo ' '
|
echo ' '
|
||||||
elif [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" = "$(hostname)" && "$multihost" != "slave" ]]; then
|
else
|
||||||
echo "Hostname in ioBroker matches the hostname of this container."
|
# get admin instance and hostname
|
||||||
if [[ "$debug" == "true" ]]; then
|
set +e
|
||||||
echo "[DEBUG] Detected hostname in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
|
admininstance=$(bash iobroker list instances | grep 'enabled' | grep -m 1 -o 'system.adapter.admin..')
|
||||||
echo "[DEBUG] Detected hostname in container: " $(hostname)
|
set -e
|
||||||
|
if [[ "$admininstance" != "" ]]; then
|
||||||
|
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 start over 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
|
||||||
|
# check hostname
|
||||||
|
if [[ "$adminhostname" != "" && "$adminhostname" != "$(hostname)" ]]; then
|
||||||
|
echo "Hostname in ioBroker does not match the hostname of this container."
|
||||||
|
echo -n "Updating hostname to "$(hostname)"... "
|
||||||
|
bash iobroker host $adminhostname
|
||||||
|
echo 'Done.'
|
||||||
|
echo ' '
|
||||||
|
elif [[ "$adminhostname" = "$(hostname)" ]]; then
|
||||||
|
echo "Hostname in ioBroker matches the hostname of this container."
|
||||||
echo "No action required."
|
echo "No action required."
|
||||||
echo ' '
|
echo ' '
|
||||||
else
|
else
|
||||||
if [[ "$debug" == "true" ]]; then
|
echo "There was a problem checking the hostname."
|
||||||
echo "[DEBUG] There was a problem checking the hostname."
|
stop_on_error
|
||||||
echo "[DEBUG] Detected hostname in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')
|
|
||||||
echo "[DEBUG] Detected hostname in container: " $(hostname)
|
|
||||||
echo ' '
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -314,14 +331,14 @@ echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.d
|
|||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
# Checking ENV for Adminport
|
# Checking ENV for Adminport
|
||||||
if [[ "$adminport" != "" ]]; then
|
if [[ "$adminport" != "" && "$multihost" != "slave" ]]; then
|
||||||
if [[ "$adminport" != "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')" ]]; then
|
adminportold=$(bash iobroker object get $admininstance --pretty | grep -oP '(?<="port": )[^,]*')
|
||||||
|
admininstanceshort=$(echo $admininstance | grep -m 1 -o 'admin..')
|
||||||
|
if [[ "$adminport" != "$adminportold" ]]; then
|
||||||
echo "IOB_ADMINPORT is set and does not match port configured in ioBroker."
|
echo "IOB_ADMINPORT is set and does not match port configured in ioBroker."
|
||||||
if [[ "$debug" == "true" ]]; then
|
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected Admin Port in ioBroker: " $adminportold; fi
|
||||||
echo "[DEBUG] Detected Admin Port in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')
|
echo "Setting Adminport to \""$adminport"\"... "
|
||||||
fi
|
bash iobroker set $admininstanceshort --port $adminport
|
||||||
echo -n "Setting Adminport to \""$adminport"\"... "
|
|
||||||
bash iobroker set admin.0 --port $adminport
|
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
echo ' '
|
echo ' '
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user