Compare commits

...

22 Commits

Author SHA1 Message Date
buanet
b0d182adfa new ioBroker versions 2022-11-10 23:48:16 +00:00
buanet
d164d9f497 fix packages check 2022-11-09 17:28:14 +01:00
buanet
6fc6b71ac6 add enabled filter for iob list instances 2022-11-09 13:19:23 +01:00
buanet
210b99c643 fix typo 2022-11-09 12:30:20 +01:00
buanet
c8e5a424fe fix typo 2022-11-09 10:27:57 +01:00
buanet
b4eb36223b change error handling 2022-11-09 09:00:37 +01:00
buanet
6223cdad53 skip hostname check when multihost is slave 2022-11-08 22:25:01 +01:00
buanet
5f40675501 fix set adminport 2022-11-08 21:33:54 +01:00
buanet
2bda056f36 fix admin detection 2022-11-08 21:19:58 +01:00
buanet
cf175a820f fix hostname check 2022-11-08 19:44:59 +01:00
André Germann
3b73bdb961 Merge pull request #297 from buanet/admin-detection-patch
Admin detection patch
2022-11-08 17:03:34 +01:00
buanet
2f9a19b2a9 fix hostname check 2022-11-08 17:00:49 +01:00
buanet
d924e84366 fix hostname check 2022-11-08 15:03:24 +01:00
André Germann
6b35addabe Update problem_report.yaml 2022-11-04 23:28:18 +01:00
André Germann
019d1c2ace Update feature_request.yaml 2022-11-04 23:27:51 +01:00
André Germann
6942c69ed2 Update feature_request.yaml 2022-11-04 23:27:03 +01:00
André Germann
8babae506a Update feature_request.yaml 2022-11-04 23:26:42 +01:00
André Germann
407b4227ee Merge pull request #295 from buanet/issue_templates
Issue templates
2022-11-04 23:21:59 +01:00
buanet
a2558e3a7b move templates 2022-11-04 09:14:22 +01:00
buanet
6674d1b098 add issue templates 2022-11-04 09:12:07 +01:00
André Germann
7c636029f9 Update CHANGELOG.md 2022-11-01 09:14:14 +01:00
buanet
c128a8fe29 fix #289 2022-11-01 09:13:10 +01:00
7 changed files with 123 additions and 39 deletions

View File

@@ -1 +1 @@
v7.1.0
v7.1.2

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View 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/

View 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

View 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

View File

@@ -1 +1 @@
2.4.12
2.5.4

View File

@@ -1,10 +1,16 @@
## Changelog
### v7.1.2 (08.11.2022)
* fix hostname check ([#293](https://github.com/buanet/ioBroker.docker/issues/293))
### v7.1.1 (01.11.2022)
* fix setting gid of iobroker group ([#289](https://github.com/buanet/ioBroker.docker/issues/289))
### v7.1.0 (31.10.2022)
* fix [build action node issue](https://forum.iobroker.net/topic/59518/docker-image-7-0-1-auf-node-js-14/14?_=1667244004952) for iobroker/iobroker repo
* v7.1.0-beta.1 (12.10.2022)
* add env DEBUG for extended debugging log
* enhance logging in iobroker-startuo.sh
* enhance logging in iobroker-startup.sh
* enhance build process
* add restart option to maintenance script
* add strict mode for iobroker-startup.sh

View File

@@ -28,6 +28,20 @@ set -u
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
dati=`date '+%Y-%m-%d %H:%M:%S'`
@@ -104,7 +118,7 @@ if [[ -f /opt/.firstrun ]]; then
if [[ "$packages" != "" && "$offlinemode" = "true" ]]; then
echo 'PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation.'
echo ' '
else
elif [[ "$packages" != "" ]]; then
echo 'PACKAGES is set. Installing additional Linux packages.'
echo "Checking the following packages:" $packages"..."
echo $packages > /opt/scripts/.docker_config/.packages
@@ -129,7 +143,7 @@ if [[ "$setgid" != "$(cat /etc/group | grep 'iobroker:' | cut -d':' -f3)" || "$s
echo "SETUID and/ or SETGID are set to individual values."
echo -n "Changing UID to "$setuid" and GID to "$setgid"... "
usermod -u $setuid iobroker
groupmod -g $setgid iobroker
groupmod -og $setgid iobroker
echo 'Done.'
echo ' '
fi
@@ -160,9 +174,7 @@ elif [[ "$(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l)" != "0" && "$(tar -z
exit 1
else
echo "IoBroker backup file detected in /opt/iobroker."
if [[ "$debug" == "true" ]]; then
echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz)
fi
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Backup file name: " $(ls *_backupiobroker.tar.gz); fi
echo -n "Preparing restore... "
mv /opt/iobroker/*.tar.gz /opt/
tar -xf /opt/initial_iobroker.tar -C /
@@ -218,33 +230,39 @@ echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... "
echo 'Done.'
echo ' '
# checking hostname in ioBroker to match container hostname
if [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" != "$(hostname)" && "$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
# hostname check
if [[ "$multihost" == "slave" ]]; then
echo "IOB_MULTIHOST ist set to \"slave\". Hostname check will be skipped."
echo ' '
elif [[ "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*')" = "$(hostname)" && "$multihost" != "slave" ]]; then
echo "Hostname in ioBroker matches 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 "No action required."
echo ' '
else
if [[ "$debug" == "true" ]]; then
echo "[DEBUG] There was a problem checking the hostname."
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)
# get admin instance and hostname
set +e
admininstance=$(bash iobroker list instances | grep 'enabled' | grep -m 1 -o 'system.adapter.admin..')
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
# 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 ' '
else
echo "There was a problem checking the hostname."
stop_on_error
fi
fi
@@ -261,14 +279,14 @@ echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.d
echo ' '
# Checking ENV for Adminport
if [[ "$adminport" != "" ]]; then
if [[ "$adminport" != "$(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')" ]]; then
if [[ "$adminport" != "" && "$multihost" != "slave" ]]; 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."
if [[ "$debug" == "true" ]]; then
echo "[DEBUG] Detected Admin Port in ioBroker: " $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="port": )[^,]*')
fi
echo -n "Setting Adminport to \""$adminport"\"... "
bash iobroker set admin.0 --port $adminport
if [[ "$debug" == "true" ]]; then echo "[DEBUG] Detected Admin Port in ioBroker: " $adminportold; fi
echo "Setting Adminport to \""$adminport"\"... "
bash iobroker set $admininstanceshort --port $adminport
echo 'Done.'
echo ' '
fi