some changes for new beta

This commit is contained in:
Andre
2019-06-13 13:58:36 +02:00
parent aed7604906
commit c80f25cca1
2 changed files with 26 additions and 9 deletions

View File

@@ -29,6 +29,7 @@ In v3.0.0 I added some new features. The following will give some short informat
|LANG|de_DE.UTF-8|following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8| |LANG|de_DE.UTF-8|following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8|
|LC_ALL|de_DE|following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8| |LC_ALL|de_DE|following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8|
|TZ|Europe/Berlin|all valid Linux-timezones| |TZ|Europe/Berlin|all valid Linux-timezones|
|HOSTNAMEOLD|old hostname|should only be used for renaming with an existing iobroker installation which was running under a different hostname before|
### Mounting Folder/ Volume ### Mounting Folder/ Volume
@@ -44,8 +45,13 @@ I added some code for fixing permissions for new iobroker-user. Permission-fixin
## Changelog ## Changelog
### v3.0.2beta (2019-06-13)
* using gosu instead of sudo
* changing output of ioBroker logging
* new env: "HOSTNAMEOLD" for migration
### v3.0.1beta (2019-05-18) ### v3.0.1beta (2019-05-18)
* switching back to iobroker-daemon for startup * ~~switching back to iobroker-daemon for startup~~
### v3.0.0 (2019-05-09) ### v3.0.0 (2019-05-09)
* bringing changes since v2.0.0 to stable * bringing changes since v2.0.0 to stable

View File

@@ -3,6 +3,7 @@
# Reading env-variables # Reading env-variables
packages=$PACKAGES packages=$PACKAGES
avahi=$AVAHI avahi=$AVAHI
hostnameold=$HOSTNAMEOLD
# 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'`
@@ -10,7 +11,7 @@ dati=`date '+%Y-%m-%d %H:%M:%S'`
# Information # Information
echo '' echo ''
echo '----------------------------------------' echo '----------------------------------------'
echo '----- Image-Version: 3.0.1beta -----' echo '----- Image-Version: 3.0.2beta -----'
echo '----- '$dati' -----' echo '----- '$dati' -----'
echo '----------------------------------------' echo '----------------------------------------'
echo '' echo ''
@@ -39,7 +40,8 @@ then
echo 'Restoring done...' echo 'Restoring done...'
fi fi
# Change sudo to gosu # Backing up original iobroker-file and changing sudo to gosu
cp -a /opt/iobroker/iobroker /opt/iobroker/iobroker.bak
sed -i 's/sudo -H -u/gosu/g' /opt/iobroker/iobroker sed -i 's/sudo -H -u/gosu/g' /opt/iobroker/iobroker
# Checking for first run of a new installation and renaming ioBroker # Checking for first run of a new installation and renaming ioBroker
@@ -52,6 +54,15 @@ then
iobroker host $(cat /opt/iobroker/.install_host) iobroker host $(cat /opt/iobroker/.install_host)
rm -f /opt/iobroker/.install_host rm -f /opt/iobroker/.install_host
echo 'Renaming ioBroker done...' echo 'Renaming ioBroker done...'
elif [ "$hostnameold" != "" ]
then
echo ''
echo 'This is the first run of an existing installation...'
echo 'Hostname given is' $(hostname)'...'
echo 'Hostname old is' $hostnameold'...'
echo 'Renaming ioBroker...'
iobroker host $hostnameold
echo 'Renaming ioBroker done...'
fi fi
# Checking for first run and change permissions # Checking for first run and change permissions
@@ -79,14 +90,14 @@ sleep 5
# Starting ioBroker # Starting ioBroker
echo '' echo ''
echo 'Starting ioBroker...' echo 'Starting ioBroker...'
iobroker start
# sudo -u iobroker node node_modules/iobroker.js-controller/controller.js > /opt/scripts/iobroker.log 2>&1 &
echo 'Starting ioBroker done...'
echo '' echo ''
echo '----------------------------------------' echo '----------------------------------------'
echo '---------- Have fun! -----------' echo '------- ioBroker Logging -------'
echo '----------------------------------------' echo '----------------------------------------'
echo ''
# Preventing container restart by keeping a process alive # gosu iobroker node node_modules/iobroker.js-controller/controller.js > /opt/scripts/iobroker.log 2>&1 &
gosu iobroker node node_modules/iobroker.js-controller/controller.js
# Preventing container restart by keeping a process alive even if iobroker will be stopped
tail -f /dev/null tail -f /dev/null