Script started on 2021-01-10 09:06:31+01:00 [TERM="xterm" TTY="/dev/pts/0" COLUMNS="106" LINES="38"] ]0;openhabian@openhab3: ~openhabian@openhab3:~ $ sudo shutdown -r nowtopjava -versionsudo openhabian-config [sudo] password for openhabian: 2021-01-10_09:06:43_CET [openHABian] Checking for root privileges... OK + export UNATTENDED MIGRATION SILENT DEBUGMAX INTERACTIVE + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/auth.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/backup.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/config.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/ext-storage.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/find.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/habapp.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/helpers.bash ++ ESC='\033[' ++ COL_DEF='\033[39;49;00m' ++ COL_RED='\033[31;01m' ++ COL_GREEN='\033[32;01m' ++ COL_YELLOW='\033[33;01m' ++ COL_BLUE='\033[34;01m' ++ COL_MAGENTA='\033[35;01m' ++ COL_CYAN='\033[36;01m' ++ COL_LGRAY='\033[37;01m' ++ COL_DGRAY='\033[90;01m' ++ export COL_DEF COL_RED COL_GREEN COL_YELLOW COL_BLUE COL_MAGENTA COL_CYAN COL_LGRAY COL_DGRAY + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/influxdb+grafana.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/java-jre.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/menu.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/nodejs-apps.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/openhab.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/openhabian.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/packages.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/system.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/vpn.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/wifi.bash + for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash + source /opt/openhabian/functions/zram.bash ++ pwd + OLDWD=/home/openhabian + cd /opt + update_openhabian_conf + local config=/etc/openhabian.conf + local referenceConfig=/opt/openhabian/openhabian.conf.dist + cp /etc/openhabian.conf /etc/openhabian.conf.BAK + cp /dev/null /etc/openhabian.conf + read -r line + [[ # Modify your openHABian settings =~ ^# ]] + echo '# Modify your openHABian settings' + read -r line + [[ # Handle with care, only touch if you need to!! =~ ^# ]] + echo '# Handle with care, only touch if you need to!!' + read -r line + [[ # This file will only be used on unattended initial install. =~ ^# ]] + echo '# This file will only be used on unattended initial install.' + read -r line + [[ # If you want to change anything after unattended install completed, use menu in openhabian-config. =~ ^# ]] + echo '# If you want to change anything after unattended install completed, use menu in openhabian-config.' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Hostname to set this one to =~ ^# ]] + echo '# Hostname to set this one to' + read -r line + [[ hostname=openhabian =~ ^# ]] + [[ -z hostname=openhabian ]] ++ echo hostname=openhabian ++ cut -d= -f1 + param=hostname + [[ -z x ]] + [[ openHABianDevice == *\ * ]] + echo hostname=openHABianDevice + read -r line + [[ # if it exists, the default user (with its working environment) will be renamed to this username given here ... =~ ^# ]] + echo '# if it exists, the default user (with its working environment) will be renamed to this username given here ...' + read -r line + [[ username=openhabian =~ ^# ]] + [[ -z username=openhabian ]] ++ echo username=openhabian ++ cut -d= -f1 + param=username + [[ -z x ]] + [[ openhabian == *\ * ]] + echo username=openhabian + read -r line + [[ # and given this password. The password will be removed from this file after completion for security reasons. =~ ^# ]] + echo '# and given this password. The password will be removed from this file after completion for security reasons.' + read -r line + [[ userpw=openhabian =~ ^# ]] + [[ -z userpw=openhabian ]] ++ echo userpw=openhabian ++ cut -d= -f1 + param=userpw + [[ -z x ]] + [[ openhabian == *\ * ]] + echo userpw=openhabian + read -r line + [[ # set this to download a SSH key and authorize the owner to login as the admin user =~ ^# ]] + echo '# set this to download a SSH key and authorize the owner to login as the admin user' + read -r line + [[ #adminkeyurl=https://github.com/openhab/openhabian/adminkey.pub =~ ^# ]] + echo '#adminkeyurl=https://github.com/openhab/openhabian/adminkey.pub' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Language and timezone. See Debian documentation for valid values. =~ ^# ]] + echo '# Language and timezone. See Debian documentation for valid values.' + read -r line + [[ timezone=Europe/Berlin =~ ^# ]] + [[ -z timezone=Europe/Berlin ]] ++ echo timezone=Europe/Berlin ++ cut -d= -f1 + param=timezone + [[ -z x ]] + [[ Europe/Berlin == *\ * ]] + echo timezone=Europe/Berlin + read -r line + [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^# ]] + [[ -z locales="en_US.UTF-8 de_DE.UTF-8" ]] ++ echo 'locales="en_US.UTF-8 de_DE.UTF-8"' ++ cut -d= -f1 + param=locales + [[ -z x ]] + [[ en_US.UTF-8 de_DE.UTF-8 == *\ * ]] + echo 'locales="en_US.UTF-8 de_DE.UTF-8"' + read -r line + [[ system_default_locale="en_US.UTF-8" =~ ^# ]] + [[ -z system_default_locale="en_US.UTF-8" ]] ++ echo 'system_default_locale="en_US.UTF-8"' ++ cut -d= -f1 + param=system_default_locale + [[ -z x ]] + [[ en_US.UTF-8 == *\ * ]] + echo system_default_locale=en_US.UTF-8 + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # WiFi settings. An ethernet connection is recommended. =~ ^# ]] + echo '# WiFi settings. An ethernet connection is recommended.' + read -r line + [[ # If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi =~ ^# ]] + echo '# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi' + read -r line + [[ # interface can be setup and used for the initial installation. =~ ^# ]] + echo '# interface can be setup and used for the initial installation.' + read -r line + [[ # Fill in your SSID and password below, leave empty or put comment in front to =~ ^# ]] + echo '# Fill in your SSID and password below, leave empty or put comment in front to' + read -r line + [[ # have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works. =~ ^# ]] + echo '# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.' + read -r line + [[ # ATTENTION: you need to escape these special characters: $, `, ", \, (newline) =~ ^# ]] + echo '# ATTENTION: you need to escape these special characters: $, `, ", \, (newline)' + read -r line + [[ # 'Escaping' means to put an additional \ in front of that character =~ ^# ]] + echo '# '\''Escaping'\'' means to put an additional \ in front of that character' + read -r line + [[ wifi_ssid="" =~ ^# ]] + [[ -z wifi_ssid="" ]] ++ echo 'wifi_ssid=""' ++ cut -d= -f1 + param=wifi_ssid + [[ -z x ]] + [[ '' == *\ * ]] + echo wifi_ssid= + read -r line + [[ wifi_psk="" =~ ^# ]] + [[ -z wifi_psk="" ]] ++ echo 'wifi_psk=""' ++ cut -d= -f1 + param=wifi_psk + [[ -z x ]] + [[ '' == *\ * ]] + echo wifi_psk= + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Wi-Fi setting. Select a two-letter country code suitable for your location =~ ^# ]] + echo '# Wi-Fi setting. Select a two-letter country code suitable for your location' + read -r line + [[ # E.g. US (default), DE, AU, NZ... =~ ^# ]] + echo '# E.g. US (default), DE, AU, NZ...' + read -r line + [[ # You may infringe on local legislature otherwise =~ ^# ]] + echo '# You may infringe on local legislature otherwise' + read -r line + [[ # See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab =~ ^# ]] + echo '# See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab' + read -r line + [[ wifi_country="" =~ ^# ]] + [[ -z wifi_country="" ]] ++ echo 'wifi_country=""' ++ cut -d= -f1 + param=wifi_country + [[ -z x ]] + [[ '' == *\ * ]] + echo wifi_country= + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Eventually disable all IPv6 e.g. on installation problems =~ ^# ]] + echo '# Eventually disable all IPv6 e.g. on installation problems' + read -r line + [[ # values: "enable", "disable" =~ ^# ]] + echo '# values: "enable", "disable"' + read -r line + [[ ipv6=enable =~ ^# ]] + [[ -z ipv6=enable ]] ++ echo ipv6=enable ++ cut -d= -f1 + param=ipv6 + [[ -z x ]] + [[ enable == *\ * ]] + echo ipv6=enable + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # repo and branch to clone from =~ ^# ]] + echo '# repo and branch to clone from' + read -r line + [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^# ]] + [[ -z repositoryurl=https://github.com/openhab/openhabian.git ]] ++ echo repositoryurl=https://github.com/openhab/openhabian.git ++ cut -d= -f1 + param=repositoryurl + [[ -z x ]] + [[ https://github.com/openhab/openhabian == *\ * ]] + echo repositoryurl=https://github.com/openhab/openhabian + read -r line + [[ clonebranch=openHAB3 =~ ^# ]] + [[ -z clonebranch=openHAB3 ]] ++ echo clonebranch=openHAB3 ++ cut -d= -f1 + param=clonebranch + [[ -z x ]] + [[ openHAB3 == *\ * ]] + echo clonebranch=openHAB3 + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # debug verbosity mode =~ ^# ]] + echo '# debug verbosity mode' + read -r line + [[ # off, on (verbose output in log) or maximum (show every command) =~ ^# ]] + echo '# off, on (verbose output in log) or maximum (show every command)' + read -r line + [[ debugmode=off =~ ^# ]] + [[ -z debugmode=off ]] ++ echo debugmode=off ++ cut -d= -f1 + param=debugmode + [[ -z x ]] + [[ maximum == *\ * ]] + echo debugmode=maximum + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # fake hardware =~ ^# ]] + echo '# fake hardware' + read -r line + [[ # force treating your box as if it was a ... =~ ^# ]] + echo '# force treating your box as if it was a ...' + read -r line + [[ # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w =~ ^# ]] + echo '# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w' + read -r line + [[ #hw=pi4 =~ ^# ]] + echo '#hw=pi4' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Hardware architecture =~ ^# ]] + echo '# Hardware architecture' + read -r line + [[ # x86_64, amd64, armv6l, armv7l, aarch64, arm64 =~ ^# ]] + echo '# x86_64, amd64, armv6l, armv7l, aarch64, arm64' + read -r line + [[ #hwarch=armv7l =~ ^# ]] + echo '#hwarch=armv7l' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # OS distribution/release =~ ^# ]] + echo '# OS distribution/release' + read -r line + [[ # Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bionic, focal =~ ^# ]] + echo '# Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bionic, focal' + read -r line + [[ #osrelease=buster =~ ^# ]] + echo '#osrelease=buster' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Java architecture mode =~ ^# ]] + echo '# Java architecture mode' + read -r line + [[ # Valid arguments: "Adopt11", "Zulu8-32", "Zulu8-64", "Zulu11-32", or "Zulu11-64" =~ ^# ]] + echo '# Valid arguments: "Adopt11", "Zulu8-32", "Zulu8-64", "Zulu11-32", or "Zulu11-64"' + read -r line + [[ java_opt=Zulu11-32 =~ ^# ]] + [[ -z java_opt=Zulu11-32 ]] ++ echo java_opt=Zulu11-32 ++ cut -d= -f1 + param=java_opt + [[ -z x ]] + [[ Zulu11-32 == *\ * ]] + echo java_opt=Zulu11-32 + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # install ZRAM per default, set to "disable" to skip installation =~ ^# ]] + echo '# install ZRAM per default, set to "disable" to skip installation' + read -r line + [[ #zraminstall=enable =~ ^# ]] + echo '#zraminstall=enable' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # start comitup hotspot if internet is not reachable =~ ^# ]] + echo '# start comitup hotspot if internet is not reachable' + read -r line + [[ hotspot=enable =~ ^# ]] + [[ -z hotspot=enable ]] ++ echo hotspot=enable ++ cut -d= -f1 + param=hotspot + [[ -z x ]] + [[ enable == *\ * ]] + echo hotspot=enable + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # external SD card device to backup and mirror the internal SD card to =~ ^# ]] + echo '# external SD card device to backup and mirror the internal SD card to' + read -r line + [[ #backupdrive=/dev/sda =~ ^# ]] + echo '#backupdrive=/dev/sda' + read -r line + [[ #storageconfig=openhab-dir =~ ^# ]] + echo '#storageconfig=openhab-dir' + read -r line + [[ #storagedir=/storage =~ ^# ]] + echo '#storagedir=/storage' + read -r line + [[ #storagetapes=15 =~ ^# ]] + echo '#storagetapes=15' + read -r line + [[ #storagecapacity=1024 =~ ^# ]] + echo '#storagecapacity=1024' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # mail relay settings =~ ^# ]] + echo '# mail relay settings' + read -r line + [[ #adminmail=john.doe@foo.bar =~ ^# ]] + echo '#adminmail=john.doe@foo.bar' + read -r line + [[ #relayuser=john.doe@foo.bar =~ ^# ]] + echo '#relayuser=john.doe@foo.bar' + read -r line + [[ #relaypass=secret =~ ^# ]] + echo '#relaypass=secret' + read -r line + [[ #smarthost=smtp.gmail.com =~ ^# ]] + echo '#smarthost=smtp.gmail.com' + read -r line + [[ #smartport=587 =~ ^# ]] + echo '#smartport=587' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # Tailscale VPN =~ ^# ]] + echo '# Tailscale VPN' + read -r line + [[ #preauthkey=tskey-xxxxxxxxxxxxxxxxx =~ ^# ]] + echo '#preauthkey=tskey-xxxxxxxxxxxxxxxxx' + read -r line + [[ '' =~ ^# ]] + [[ -z '' ]] + echo '' + read -r line + [[ # vim: filetype=sh =~ ^# ]] + echo '# vim: filetype=sh' + read -r line + config_ipv6 + local aptConf=/etc/apt/apt.conf.d/S90force-ipv4 + local sysctlConf=/etc/sysctl.d/99-sysctl.conf + [[ enable == \d\i\s\a\b\l\e ]] + [[ enable == \e\n\a\b\l\e ]] + grep -qs '^[[:space:]]*# Disable all IPv6 functionality' /etc/sysctl.d/99-sysctl.conf + [[ -n '' ]] + apt_update + PID_APT=11361 + apt-get update + whiptail_check ++ command -v whiptail + [[ -x /usr/bin/whiptail ]] + load_create_config + local 'questionText=\nWelcome to openHABian!\n\nPlease provide the name of your Linux user i.e. the account you normally log in with.\n\nTypical user names are '\''pi'\'' or '\''ubuntu'\''.' + local input + [[ -f /etc/openhabian.conf ]] ++ timestamp ++ date +%F_%T_%Z + echo -n '2021-01-10_09:06:44_CET [openHABian] Loading configuration file '\''/etc/openhabian.conf'\''... ' 2021-01-10_09:06:44_CET [openHABian] Loading configuration file '/etc/openhabian.conf'... ++ getent group openhabian + [[ ! -n openhabian:x:1000:openhabian,frontail ]] + id -u openhabian + source /etc/openhabian.conf ++ hostname=openHABianDevice ++ username=openhabian ++ userpw=openhabian ++ timezone=Europe/Berlin ++ locales='en_US.UTF-8 de_DE.UTF-8' ++ system_default_locale=en_US.UTF-8 ++ wifi_ssid= ++ wifi_psk= ++ wifi_country= ++ ipv6=enable ++ repositoryurl=https://github.com/openhab/openhabian ++ clonebranch=openHAB3 ++ debugmode=maximum ++ java_opt=Zulu11-32 ++ hotspot=enable + echo OK OK + openhabian_console_check + [[ -z 1 ]] ++ tput cols + [[ 106 -ge 120 ]] + local warningText + warningText='We detected that you use a console which is less than 120 columns wide. This tool is designed for a minimum of 120 columns and therefore some menus may not be presented correctly. Please increase the width of your console and rerun this tool.\n\nEither resize the window or consult the preferences of your console application.' + whiptail --title 'Compatibility Warning' --msgbox 'We detected that you use a console which is less than 120 columns wide. This tool is designed for a minimum of 120 columns and therefore some menus may not be presented correctly. Please increase the width of your console and rerun this tool.\n\nEither resize the window or consult the preferences of your console application.' 13 80 [?1049h[?25l(B                                        (B┌──────────────────────────┤ Compatibility Warning ├───────────────────────────┐│ │ (B│ We detected that you use a console which is less than 120 columns wide. This │ (B│ tool is designed for a minimum of 120 columns and therefore some menus may │ (B│ not be presented correctly. Please increase the width of your console and │ (B│ rerun this tool. │ (B│ │ (B│ Either resize the window or consult the preferences of your console │ (B│ application. │ (B│ │ (B│  │ (B│ │ (B└──────────────────────────────────────────────────────────────────────────────┘  [?12l[?25h(B(B  [?1049l+ openhabian_update_check + [[ -z 1 ]] + local branch + local introText + local unsupportedHWText + local unsupportedOSText + branch=openHAB3 + introText='Additions, improvements or fixes were added to the openHABian configuration tool. Would you like to update now and benefit from them? The update will not automatically apply changes to your system.\n\nUpdating is recommended.' + unsupportedHWText='You are running on old hardware that is no longer officially supported.\nopenHABian may still work with this or not.\nWe recommend that you replace your hardware with a current SBC such as a RPi4/2GB.\nDo you really want to continue using openHABian on this system?' + unsupportedOSText='You are running an old Linux release that is no longer officially supported.\nWe recommend upgrading to the most current stable release of your distribution (or current Long Term Support version for distributions that offer LTS).\nDo you really want to continue using openHABian on this system?' ++ timestamp ++ date +%F_%T_%Z ++ get_git_revision ++ local branch ++ local latestTag ++ local revCount ++ local shorthash +++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD ++ branch=openHAB3 +++ git -C /opt/openhabian describe --tags --abbrev=0 ++ latestTag=patchday-20210104 +++ wc -l +++ git -C /opt/openhabian log --oneline ++ revCount=1113 +++ git -C /opt/openhabian log --pretty=format:%h -n 1 ++ shorthash=2652a12 ++ echo '[openHAB3]patchday-20210104-1113(2652a12)' + echo '2021-01-10_09:06:46_CET [openHABian] openHABian configuration tool version: [openHAB3]patchday-20210104-1113(2652a12)' 2021-01-10_09:06:46_CET [openHABian] openHABian configuration tool version: [openHAB3]patchday-20210104-1113(2652a12) ++ timestamp ++ date +%F_%T_%Z + echo -n '2021-01-10_09:06:47_CET [openHABian] Checking for changes in origin branch openHAB3... ' 2021-01-10_09:06:47_CET [openHABian] Checking for changes in origin branch openHAB3... + is_pine64 ++ uname -r + [[ 5.4.83-v7+ =~ pine64-longsleep ]] + return 1 + is_jessie + [[ '' == \j\e\s\s\i\e ]] ++ cat /etc/os-release + [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ jessie ]] + return 1 + is_xenial + [[ '' == \x\e\n\i\a\l ]] ++ cat /etc/os-release + [[ PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ xenial ]] + return 1 + git -C /opt/openhabian config user.email openhabian@openHABian + git -C /opt/openhabian config user.name openhabian + git -C /opt/openhabian fetch --quiet origin ++ git -C /opt/openhabian rev-parse openHAB3 ++ git -C /opt/openhabian rev-parse '@{u}' + [[ 2652a121991e1910ac9896aaa2b247b3cd34006f == 2652a121991e1910ac9896aaa2b247b3cd34006f ]] + echo OK OK + openhabian_announcements + [[ -z 1 ]] + local newsFile + local readNews + newsFile=/opt/openhabian/NEWS.md + readNews=/opt/openhabian/docs/LASTNEWS.md + cmp --silent /opt/openhabian/NEWS.md /opt/openhabian/docs/LASTNEWS.md ++ cat /opt/openhabian/NEWS.md + whiptail --title 'openHABian announcements' --yes-button 'Stop Displaying' --no-button 'Keep Displaying' --defaultno --scrolltext --yesno 'Hit tab to unselect buttons and scroll through the text using UP/DOWN or PGUP/PGDN. All announcements are stored in `/opt/openhabian/docs/NEWSLOG.md` for you to lookup. ## openHAB 3 released ## December 21, 2020 In the darkest of times (midwinter for most of us), openHAB 3 gets released. See [documentation](docs/openhabian.md#on-openhab3) and [www.openhab.org](http://www.openhab.org) for details. Merry Christmas and a healthy New Year ! ## WiFi Hotspot ## November 14, 2020 Whenever your system has a WiFi interface that fails to initialize on installation or startup, openHABian will now launch a [WiFi hotspot](docs/openhabian.md#WiFi-Hotspot) you can use to connect your system to an existing WiFi network. ## Tailscale VPN network ## October 6, 2020 Tailscale is a management toolset to establish a WireGuard based VPN between multiple systems if you want to connect to openHAB(ian) instances outside your LAN over Internet. It'\''ll take care to detect and open ports when you and your peers are located behind firewalls. This makes use of the tailscale service. Don'\''t worry, for private use it'\''s free of charge. ## Auto-backup ## August 29, 2020 openHABian can automatically take daily syncs of your internal SD card to another card in an external port. This allows for fast swapping of cards to reduce impact of a failed SD card. The remaining space on the external device will be made use of for openHABian'\''s Amanda backup system.' 27 100 [?1049h[?25l(B                                        (B┌───────────────────────────────────┤ openHABian announcements ├───────────────────────────────────┐│ │ (B│ Hit tab to unselect buttons and scroll through the text using UP/DOWN or PGUP/PGDN.  (B│ All announcements are stored in `/opt/openhabian/docs/NEWSLOG.md` for you to lookup.  (B│  (B│ ## openHAB 3 released ## December 21, 2020  (B│ In the darkest of times (midwinter for most of us), openHAB 3 gets released.  (B│ See [documentation](docs/openhabian.md#on-openhab3) and  (B│ [www.openhab.org](http://www.openhab.org) for details.  (B│  (B│ Merry Christmas and a healthy New Year !  (B│  (B│  (B│ ## WiFi Hotspot ## November 14, 2020  (B│ Whenever your system has a WiFi interface that fails to initialize on installation or startup,  (B│ openHABian will now launch a [WiFi hotspot](docs/openhabian.md#WiFi-Hotspot) you can use to  (B│ connect your system to an existing WiFi network.  (B│  (B│  (B│ ## Tailscale VPN network ## October 6, 2020  (B│ Tailscale is a management toolset to establish a WireGuard based VPN between multiple systems  (B│ if you want to connect to openHAB(ian) instances outside your LAN over Internet.  (B│ It'll take care to detect and open ports when you and your peers are located behind firewalls.  (B│  (B│   (B│ │ (B└──────────────────────────────────────────────────────────────────────────────────────────────────┘  [?12l[?25h(B(B  [?1049l++ timestamp ++ date +%F_%T_%Z + echo -n '2021-01-10_09:06:51_CET [openHABian] Switching to branch openHAB3... ' 2021-01-10_09:06:51_CET [openHABian] Switching to branch openHAB3... + git -C /opt/openhabian checkout --quiet openHAB3 + echo OK OK + [[ -n '' ]] + show_main_menu + local choice + local version +++ get_git_revision +++ local branch +++ local latestTag +++ local revCount +++ local shorthash ++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD +++ branch=openHAB3 ++++ git -C /opt/openhabian describe --tags --abbrev=0 +++ latestTag=patchday-20210104 ++++ git -C /opt/openhabian log --oneline ++++ wc -l +++ revCount=1113 ++++ git -C /opt/openhabian log --pretty=format:%h -n 1 +++ shorthash=2652a12 +++ echo '[openHAB3]patchday-20210104-1113(2652a12)' ++ whiptail --title 'Welcome to the openHABian Configuration Tool [openHAB3]patchday-20210104-1113(2652a12)' --menu 'Setup Options' 18 116 11 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Upgrade all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB release 3' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►' [?1049h[?25l(B                                        (B──────┤ Welcome to the openHABian Configuration Tool [openHAB3]patchday-20210104-1113(2652a12) ├────────── 00 | About openHABian Information about the openHABian project and this tool   01 | Select Branch Select the openHABian config tool version ("branch") to run 02 | Upgrade System Upgrade all installed software packages (incl. openHAB) to their latest ver 03 | Install openHAB Install or upgrade to openHAB release 3  10 | Apply Improvements Apply the latest improvements to the basic openHABian setup ► 20 | Optional Components Choose from a set of optional software components ► 30 | System Settings A range of system and hardware related configuration steps ► 40 | openHAB Related Switch the installed openHAB version or apply tweaks ► 50 | Backup/Restore Manage backups and restore your system ►     ────────────────────────────────────────────────────────────────────────────────────────────────────────── (B00 | About openHABian Information about the openHABian project and this tool 01 | Select Branch Select the openHABian config tool version ("branch") to run 01 | Select Branch Select the openHABian config tool version ("branch") to run02 | Upgrade System Upgrade all installed software packages (incl. openHAB) to their latest ver02 | Upgrade System Upgrade all installed software packages (incl. openHAB) to their latest ver03 | Install openHAB Install or upgrade to openHAB release 3 03 | Install openHAB Install or upgrade to openHAB release 3 10 | Apply Improvements Apply the latest improvements to the basic openHABian setup ► 10 | Apply Improvements Apply the latest improvements to the basic openHABian setup ►20 | Optional Components Choose from a set of optional software components ► 20 | Optional Components Choose from a set of optional software components ►30 | System Settings A range of system and hardware related configuration steps ► 30 | System Settings A range of system and hardware related configuration steps ►40 | openHAB Related Switch the installed openHAB version or apply tweaks ► 40 | openHAB Related Switch the installed openHAB version or apply tweaks ►50 | Backup/Restore Manage backups and restore your system ► [?12l[?25h(B  [?1049l+ choice='50 | Backup/Restore' + RET=0 + '[' 0 -eq 1 ']' + '[' 0 -eq 255 ']' + [[ 50 | Backup/Restore == '' ]] + [[ 50 | Backup/Restore == \0\0* ]] + [[ 50 | Backup/Restore == \0\1* ]] + [[ 50 | Backup/Restore == \0\2* ]] + [[ 50 | Backup/Restore == \0\3* ]] + [[ 50 | Backup/Restore == \1\0* ]] + [[ 50 | Backup/Restore == \2\0* ]] + [[ 50 | Backup/Restore == \3\0* ]] + [[ 50 | Backup/Restore == \4\0* ]] + [[ 50 | Backup/Restore == \5\0* ]] +++ get_git_revision +++ local branch +++ local latestTag +++ local revCount +++ local shorthash ++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD +++ branch=openHAB3 ++++ git -C /opt/openhabian describe --tags --abbrev=0 +++ latestTag=patchday-20210104 ++++ git -C /opt/openhabian log --oneline ++++ wc -l +++ revCount=1113 ++++ git -C /opt/openhabian log --pretty=format:%h -n 1 +++ shorthash=2652a12 +++ echo '[openHAB3]patchday-20210104-1113(2652a12)' ++ whiptail --title 'Welcome to the openHABian Configuration Tool [openHAB3]patchday-20210104-1113(2652a12)' --menu Backup/Restore 14 116 7 --cancel-button Back --ok-button Execute '50 | Backup openHAB config' 'Backup the current active openHAB configuration' '51 | Restore an openHAB config' 'Restore a previous openHAB configuration from backup' '52 | Amanda System Backup' 'Set up Amanda to comprehensively backup your complete openHABian box' '53 | Setup SD mirroring' 'Setup mirroring of internal to external SD card' ' | Remove SD mirroring' 'Disable mirroring of SD cards' '54 | Raw copy SD' 'Raw copy internal SD to external disk / SD card' '55 | Sync SD' 'Rsync internal SD to external disk / SD card' [?1049h[?25l(B                                        (B──────┤ Welcome to the openHABian Configuration Tool [openHAB3]patchday-20210104-1113(2652a12) ├────────── 50 | Backup openHAB config Backup the current active openHAB configuration  51 | Restore an openHAB config Restore a previous openHAB configuration from backup 52 | Amanda System Backup Set up Amanda to comprehensively backup your complete openHABian box 53 | Setup SD mirroring Setup mirroring of internal to external SD card | Remove SD mirroring Disable mirroring of SD cards 54 | Raw copy SD Raw copy internal SD to external disk / SD card 55 | Sync SD Rsync internal SD to external disk / SD card     ────────────────────────────────────────────────────────────────────────────────────────────────────────── (B50 | Backup openHAB config Backup the current active openHAB configuration51 | Restore an openHAB config Restore a previous openHAB configuration from backup 51 | Restore an openHAB config Restore a previous openHAB configuration from backup52 | Amanda System Backup Set up Amanda to comprehensively backup your complete openHABian box52 | Amanda System Backup Set up Amanda to comprehensively backup your complete openHABian box53 | Setup SD mirroring Setup mirroring of internal to external SD card [?12l[?25h(B  [?1049l+ choice2='53 | Setup SD mirroring' + '[' 0 -eq 1 ']' + '[' 1 -eq 255 ']' + case "$choice2" in + setup_mirror_SD install + [[ -n '' ]] + local dest + local srcSize + local destSize + local minBackupSize + local serviceTargetDir=/etc/systemd/system/ + local storageDir=/storage + local 'sizeError=your destination SD card device does not have enough space, it needs to have at least twice as much as the source' + local 'infoText1=DANGEROUS OPERATION, USE WITH PRECAUTION!\n\nThis will *copy* your system root from your SD card to a USB attached card writer device. Are you sure' + local 'infoText2=is an SD card writer device equipped with a dispensible SD card? Are you sure, this will destroy all data on that card and you want to proceed writing to this device?' ++ timestamp ++ date +%F_%T_%Z + echo -n '2021-01-10_09:07:02_CET [openHABian] Setting up automated SD mirroring and backup... ' 2021-01-10_09:07:02_CET [openHABian] Setting up automated SD mirroring and backup... + [[ install == \r\e\m\o\v\e ]] + [[ install != \i\n\s\t\a\l\l ]] + is_pi + is_pifour + [[ '' == \p\i\4 ]] + grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo + return 1 + is_cmfour + [[ '' == \c\m\4 ]] + grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]14[0-9a-fA-F]$' /proc/cpuinfo + return 1 + is_pi400 + [[ '' == \p\i\4\0\0 ]] + grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]13[0-9a-fA-F]$' /proc/cpuinfo + return 1 + is_cmthreeplus + [[ '' == \c\m\3\+ ]] + grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]10[0-9a-fA-F]$' /proc/cpuinfo + return 1 + is_cmthree + [[ '' == \c\m\3 ]] + grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[aA][0-9a-fA-F]$' /proc/cpuinfo + return 1 + is_pithree + [[ '' == \p\i\3 ]] + grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[8dDeE][0-9a-fA-F]$' /proc/cpuinfo + return 0 + return 0 + mkdir -p /storage + cond_redirect apt-get install --yes gdisk + [[ -n '' ]] + echo -e '\n\033[90;01m$ apt-get install --yes gdisk \033[39;49;00m' $ apt-get install --yes gdisk  + apt-get install --yes gdisk Reading package lists... 0% Reading package lists... 100% Reading package lists... Done Building dependency tree... 0% Building dependency tree... 0% Building dependency tree... 50% Building dependency tree... 50% Building dependency tree Reading state information... 0% Reading state information... 0% Reading state information... Done gdisk is already the newest version (1.0.3-1.1). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. + return 0 + echo OK OK + cond_redirect install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin + [[ -n '' ]] + echo -e '\n\033[90;01m$ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin \033[39;49;00m' $ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin  + install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin + return 0 + [[ -n 1 ]] + select_blkdev '^sd' 'Setup SD mirroring' 'Select USB device to copy the internal SD card data to' + [[ -z 1 ]] + array=() + declare -a array + read -r id foo foo size foo foo foo ++ lsblk -i ++ tr -d '`\\|' ++ grep -E '^sd' ++ tr -d '\\-' + array+=("$id" "$size") + read -r id foo foo size foo foo foo + [[ 2 -eq 0 ]] + (( count=2 + 8 )) ++ whiptail --title 'Setup SD mirroring' --cancel-button Cancel --ok-button Select --menu '\nSelect USB device to copy the internal SD card data to' 10 76 0 sda 29.7G [?1049h[?25l(B                                        (B┌──────────────────────────┤ Setup SD mirroring ├──────────────────────────┐│ │ (B│ Select USB device to copy the internal SD card data to │ (B│ │ (B│ sda 29.7G │ (B│ │ (B│ │ (B│