mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 19:09:02 +02:00
Compare commits
13 Commits
v9.1.0-bet
...
gui_for_ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0ea8c2808 | ||
|
|
d1bbbfff58 | ||
|
|
11e30fa638 | ||
|
|
e5956c6faf | ||
|
|
feb02a7a33 | ||
|
|
3f3cfdb077 | ||
|
|
3a8e38b3ee | ||
|
|
fa9e09ed1b | ||
|
|
5c97b2a041 | ||
|
|
c6b0d307b5 | ||
|
|
59ffff608a | ||
|
|
6c34c0a081 | ||
|
|
92821ab262 |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@@ -5,4 +5,4 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
target-branch: "main"
|
target-branch: "beta"
|
||||||
|
|||||||
10
.github/workflows/build-debian12-beta.yml
vendored
10
.github/workflows/build-debian12-beta.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5.0.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
context: ./debian12
|
context: ./debian12
|
||||||
file: ./debian12/Dockerfile
|
file: ./debian12/Dockerfile
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
@@ -142,7 +142,7 @@ jobs:
|
|||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5.0.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
context: ./debian12
|
context: ./debian12
|
||||||
file: ./debian12/Dockerfile
|
file: ./debian12/Dockerfile
|
||||||
@@ -166,7 +166,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Delete images
|
- name: Delete images
|
||||||
uses: actions/github-script@v6.4.1
|
uses: actions/github-script@v7.0.1
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
10
.github/workflows/build-debian12-dev.yml
vendored
10
.github/workflows/build-debian12-dev.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ jobs:
|
|||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5.0.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
context: ./debian12
|
context: ./debian12
|
||||||
file: ./debian12/Dockerfile
|
file: ./debian12/Dockerfile
|
||||||
@@ -85,7 +85,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ jobs:
|
|||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5.0.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
context: ./debian12
|
context: ./debian12
|
||||||
file: ./debian12/Dockerfile
|
file: ./debian12/Dockerfile
|
||||||
@@ -150,7 +150,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Delete images
|
- name: Delete images
|
||||||
uses: actions/github-script@v6.4.1
|
uses: actions/github-script@v7.0.1
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
10
.github/workflows/build-debian12-latest.yml
vendored
10
.github/workflows/build-debian12-latest.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
|
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
@@ -64,7 +64,7 @@ jobs:
|
|||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5.0.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
context: ./debian12
|
context: ./debian12
|
||||||
file: ./debian12/Dockerfile
|
file: ./debian12/Dockerfile
|
||||||
@@ -94,7 +94,7 @@ jobs:
|
|||||||
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
|
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: ${{ env.RELEASE_TAG }}
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASS_IOB }}
|
password: ${{ secrets.DOCKER_PASS_IOB }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5.0.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
context: ./debian12
|
context: ./debian12
|
||||||
file: ./debian12/Dockerfile
|
file: ./debian12/Dockerfile
|
||||||
@@ -156,7 +156,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Delete images
|
- name: Delete images
|
||||||
uses: actions/github-script@v6.4.1
|
uses: actions/github-script@v7.0.1
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
2
.github/workflows/update-docker-readme.yml
vendored
2
.github/workflows/update-docker-readme.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
update-docker-readme:
|
update-docker-readme:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.0
|
- uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Update Docker Hub Readme (buanet)
|
- name: Update Docker Hub Readme (buanet)
|
||||||
uses: peter-evans/dockerhub-description@v3.4.2
|
uses: peter-evans/dockerhub-description@v3.4.2
|
||||||
|
|||||||
2
.github/workflows/version-checks.yml
vendored
2
.github/workflows/version-checks.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
token: ${{ secrets.ACTIONS_PAT }}
|
token: ${{ secrets.ACTIONS_PAT }}
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,10 +1,13 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### v9.1.0-beta.2 (coming soon)
|
### v9.1.0-beta.3 (23.11.2023)
|
||||||
* enhance logging/ fix typos
|
* add --force to restore in maintenance script
|
||||||
* add env PACKAGES_UPDATE and remove automatic package updates on first container start
|
* improve shebang in scripts for downgrade and portability
|
||||||
* improve setuid/setgid handling during startup ([#397](https://github.com/buanet/ioBroker.docker/issues/397))
|
* v9.1.0-beta.2 (06.11.2023)
|
||||||
* move maintenance script registration to dockerfile ([#390](https://github.com/buanet/ioBroker.docker/issues/390))
|
* enhance logging/ fix typos
|
||||||
|
* add env PACKAGES_UPDATE and remove automatic package updates on first container start
|
||||||
|
* improve setuid/setgid handling during startup ([#397](https://github.com/buanet/ioBroker.docker/issues/397))
|
||||||
|
* move maintenance script registration to dockerfile ([#390](https://github.com/buanet/ioBroker.docker/issues/390))
|
||||||
* v9.1.0-beta.1 (03.11.2023)
|
* v9.1.0-beta.1 (03.11.2023)
|
||||||
* improve maintenance command by symlinking ([#390](https://github.com/buanet/ioBroker.docker/issues/390))
|
* improve maintenance command by symlinking ([#390](https://github.com/buanet/ioBroker.docker/issues/390))
|
||||||
* fix restore/ adding backup file selection ([#394](https://github.com/buanet/ioBroker.docker/issues/394))
|
* fix restore/ adding backup file selection ([#394](https://github.com/buanet/ioBroker.docker/issues/394))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Script checks health of running container
|
# Script checks health of running container
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# run iob fix
|
# run iob fix
|
||||||
iob_fix () {
|
iob_fix () {
|
||||||
|
|||||||
@@ -223,7 +223,6 @@ restore_iobroker() {
|
|||||||
# check autoconfirm
|
# check autoconfirm
|
||||||
if [[ "$autoconfirm" != yes ]]; then
|
if [[ "$autoconfirm" != yes ]]; then
|
||||||
local reply
|
local reply
|
||||||
|
|
||||||
read -rp 'Do you want to continue [yes/no]? ' reply
|
read -rp 'Do you want to continue [yes/no]? ' reply
|
||||||
if [[ "$reply" != y && "$reply" != Y && "$reply" != yes ]]; then
|
if [[ "$reply" != y && "$reply" != Y && "$reply" != yes ]]; then
|
||||||
return 1
|
return 1
|
||||||
@@ -255,10 +254,11 @@ restore_iobroker() {
|
|||||||
return 1
|
return 1
|
||||||
elif [[ $backup_count -eq 1 ]]; then
|
elif [[ $backup_count -eq 1 ]]; then
|
||||||
selected_backup=$(basename "${backup_files[0]}")
|
selected_backup=$(basename "${backup_files[0]}")
|
||||||
echo "There is one backup file in $backup_dir."
|
echo "Selected backup file is \"$selected_backup\"."
|
||||||
else
|
else
|
||||||
# more than one backup file found, ask user to select
|
# more than one backup file found, ask user to select
|
||||||
echo "There is more than one backup file in $backup_dir."
|
echo "There are more than one backup file in \"$backup_dir\"."
|
||||||
|
echo ' '
|
||||||
echo "Please select file for restore:"
|
echo "Please select file for restore:"
|
||||||
for ((i=0; i<$backup_count; i++)); do
|
for ((i=0; i<$backup_count; i++)); do
|
||||||
echo "$i: $(basename "${backup_files[$i]}")"
|
echo "$i: $(basename "${backup_files[$i]}")"
|
||||||
@@ -267,12 +267,71 @@ restore_iobroker() {
|
|||||||
|
|
||||||
read -rp "Enter the number of the backup to restore (0-$((backup_count - 1))): " selected_number
|
read -rp "Enter the number of the backup to restore (0-$((backup_count - 1))): " selected_number
|
||||||
selected_backup=$(basename "${backup_files[$selected_number]}")
|
selected_backup=$(basename "${backup_files[$selected_number]}")
|
||||||
|
echo ' '
|
||||||
|
echo "Selected backup file is \"$selected_backup\"."
|
||||||
|
echo ' '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# restoe backup
|
# extract backup.json from backup
|
||||||
echo -n "Restoring ioBroker from $selected_backup... "
|
tar -xvzf $backup_dir/$selected_backup -C $backup_dir --strip-components=1 "backup/backup.json" > /dev/null 2>&1
|
||||||
|
# write js-controller versions from backup.json into array
|
||||||
|
jq_output=$(jq --arg TITLE "JS controller" -r '.objects[] | select(.value.common.title == $TITLE)' $backup_dir/backup.json)
|
||||||
|
# remove backup.json
|
||||||
|
rm $backup_dir/backup.json
|
||||||
|
|
||||||
|
result=()
|
||||||
|
while read -r line; do
|
||||||
|
entry=$(echo "$line" | jq -r '.value.common.installedVersion')
|
||||||
|
result+=("$entry")
|
||||||
|
done <<< "$(echo "$jq_output" | jq -c '.')"
|
||||||
|
|
||||||
|
# check for empty array
|
||||||
|
if [[ "${#result[@]}" -eq 0 ]]; then
|
||||||
|
echo "There was a problem detecting the js-controller version in the seclected backup file."
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
# check if all found js-controller versions are equal (for multihost systems!)
|
||||||
|
first_version=${result[0]}
|
||||||
|
all_versions_equal=true
|
||||||
|
for i in "${result[@]}"; do
|
||||||
|
version=$i
|
||||||
|
if [[ "$version" != "$first_version" ]]; then
|
||||||
|
all_versions_equal=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$all_versions_equal" != true ]]; then
|
||||||
|
echo "Detected different js-controller versions in the selected backup file."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# compare installed js-controller version with version from backup file
|
||||||
|
echo -n "Checking js-controller versions... "
|
||||||
|
installed_version=$(iob version js-controller)
|
||||||
|
echo "Done."
|
||||||
|
echo ' '
|
||||||
|
echo "Installed js-controller version: $installed_version"
|
||||||
|
echo "Backup js-controller version: $first_version"
|
||||||
|
echo ' '
|
||||||
|
|
||||||
|
if [[ "$first_version" != "$installed_version" ]]; then
|
||||||
|
echo "The installed js-controller version is different from the version in the selected backup file."
|
||||||
|
echo "If you continue, the script will use the \"--force\" option to restore your backup."
|
||||||
|
echo "Although this is normally safe with small version differences, you should know,"
|
||||||
|
echo "that the recommended way is to first install the same js-controller version before restoring the backup file."
|
||||||
|
local reply
|
||||||
|
read -rp 'Do you want to continue [yes/no]? ' reply
|
||||||
|
if [[ "$reply" != y && "$reply" != Y && "$reply" != yes ]]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Restoring ioBroker from \"$selected_backup\"... "
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
bash iobroker restore "$selected_backup" > /opt/iobroker/log/restore.log 2>&1
|
bash iobroker restore "$selected_backup" --force > /opt/iobroker/log/restore.log 2>&1
|
||||||
return_value=$?
|
return_value=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -344,4 +403,4 @@ for arg in "$@"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
"${run[@]}"
|
"${run[@]}"
|
||||||
|
|||||||
32
debian12/scripts/maintenance_gui.sh
Normal file
32
debian12/scripts/maintenance_gui.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
welcome () {
|
||||||
|
whiptail --title "ioBroker Docker Container Maintenance Script" --ok-button "OK" --msgbox " \
|
||||||
|
╔═══════════════════════════════════════════════════════════════════════╗\
|
||||||
|
\n ║ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ███████╗ ██████╗ ║\
|
||||||
|
\n ║ ██║ ██╔═══██╗ ██╔══██╗ ██╔══██╗ ██╔═══██╗ ██║ ██╔╝ ██╔════╝ ██╔══██╗ ║\
|
||||||
|
\n ║ ██║ ██║ ██║ ██████╔╝ ██████╔╝ ██║ ██║ █████╔╝ █████╗ ██████╔╝ ║\
|
||||||
|
\n ║ ██║ ██║ ██║ ██╔══██╗ ██╔══██╗ ██║ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗ ║\
|
||||||
|
\n ║ ██║ ╚██████╔╝ ██████╔╝ ██║ ██║ ╚██████╔╝ ██║ ██╗ ███████╗ ██║ ██║ ║\
|
||||||
|
\n ║ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ║\
|
||||||
|
\n ╚═══════════════════════════════════════════════════════════════════════╝\
|
||||||
|
\n This script will help you to maintain your ioBroker Docker container!\
|
||||||
|
\n" 19 79
|
||||||
|
}
|
||||||
|
|
||||||
|
if welcome; then
|
||||||
|
TO_RUN=$(whiptail --title "ioBroker Docker Container Maintenance Script" --menu "What do you want to do?" 25 78 5 \
|
||||||
|
"maintenance" "Turn Maintenance Mode on or off" \
|
||||||
|
"upgrade" "Upgrade js-controller" \
|
||||||
|
"restore" "Restore ioBroker from backup" 3>&1 1>&2 2>&3)
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $TO_RUN = "maintenance" ]]; then
|
||||||
|
echo "You selected maintenance"
|
||||||
|
elif [[ $TO_RUN = "upgrade" ]]; then
|
||||||
|
echo "You selected upgrade"
|
||||||
|
elif [[ $TO_RUN = "restore" ]]; then
|
||||||
|
echo "You selected restore"
|
||||||
|
fi
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ -e /usr/sbin/avahi-daemon ] && [ -e /var/run/dbus ]
|
if [ -e /usr/sbin/avahi-daemon ] && [ -e /var/run/dbus ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# reading env
|
# reading env
|
||||||
debug=$DEBUG
|
debug=$DEBUG
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# bash strict mode
|
# bash strict mode
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
Reference in New Issue
Block a user