root@raspi:/home/pi# curl -sSL https://raw.githubusercontent.com/camueller/SmartApplianceEnabler/master/install/setup.sh | sh --2024-04-02 18:28:01-- https://raw.githubusercontent.com/camueller/SmartApplianceEnabler/master/install/install2.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8000::154, 2606:50c0:8001::154, 2606:50c0:8002::154, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8000::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8003::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 6120 (6.0K) [text/plain] Saving to: ‘/usr/local/bin/install2.sh’ install2.sh 100%[===================================================================================================================================================>] 5.98K --.-KB/s in 0.001s 2024-04-02 18:28:01 (4.12 MB/s) - ‘/usr/local/bin/install2.sh’ saved [6120/6120] --2024-04-02 18:28:01-- https://raw.githubusercontent.com/camueller/SmartApplianceEnabler/master/install/install.config Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8000::154, 2606:50c0:8001::154, 2606:50c0:8002::154, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8000::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8003::154|:443... failed: Network is unreachable. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2144 (2.1K) [text/plain] Saving to: ‘/usr/local/etc/install.config’ install.config 100%[===================================================================================================================================================>] 2.09K --.-KB/s in 0.001s 2024-04-02 18:28:02 (3.20 MB/s) - ‘/usr/local/etc/install.config’ saved [2144/2144] + CONFIG_FILE=/usr/local/etc/install.config + . /usr/local/etc/install.config + PASSWORD=sae + WIFI_SSID= + WIFI_PSK= + WIFI_COUNTRY=DE + TIMEZONE=Europe/Berlin + INSTALL_MBUSD=true + INSTALL_WEBMIN=true + LOG=/tmp/install.log + PREFIX=********** + PACKAGES=openjdk-11-jre-headless pigpiod jq mosquitto + WEBMIN_VERSION=2.105 + PARENT_SCRIPT=/etc/rc.local + PARENT_SCRIPT_BACKUP=/etc/rc.local.bak + SCRIPT2=install2.sh + INSTALL_DIR=/usr/local/bin + SAE_HOME=/opt/sae + POWER_LED=/sys/class/leds/led1/brightness + [ true = true ] + PACKAGES=openjdk-11-jre-headless pigpiod jq mosquitto git cmake + [ true = true ] + PACKAGES=openjdk-11-jre-headless pigpiod jq mosquitto git cmake perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl shared-mime-info apt-show-versions python3 + [ -n ] + echo ********** Waiting before updating the software catalog ... + sleep 30 + echo ********** Update software catalog ... + apt update WARNING: apt does not have a stable CLI interface. Use with caution in scripts. W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. + echo ********** Upgrading system ... + apt upgrade -y WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Extracting templates from packages: 100% + echo Allow shared mounts by udevd (possibly reset by system upgrade) ... + sed -i s/PrivateMounts\=yes/PrivateMounts\=no/g /lib/systemd/system/systemd-udevd.service + echo ********** Setting time zone ... + echo Europe/Berlin + cat /etc/timezone + echo ********** Copy zoneinfo ... + cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime cp: '/usr/share/zoneinfo/Europe/Berlin' and '/etc/localtime' are the same file + echo ********** Install required packages ... + apt install openjdk-11-jre-headless pigpiod jq mosquitto git cmake perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl shared-mime-info apt-show-versions python3 -y WARNING: apt does not have a stable CLI interface. Use with caution in scripts. E: Unable to correct problems, you have held broken packages. + echo ********** Setting up pigpiod ... + sed -i s/ExecStart=\/usr\/bin\/pigpiod -l/ExecStart=\/usr\/bin\/pigpiod/g /lib/systemd/system/pigpiod.service + systemctl start pigpiod + systemctl enable pigpiod Created symlink /etc/systemd/system/multi-user.target.wants/pigpiod.service → /lib/systemd/system/pigpiod.service. + echo ********** Setting up mosquitto ... + sed -i s/persistence true/persistence false/g /etc/mosquitto/mosquitto.conf sed: can't read /etc/mosquitto/mosquitto.conf: No such file or directory /usr/local/bin/install2.sh: 66: cannot create /etc/mosquitto/conf.d/smartapplianceenabler.conf: Directory nonexistent /usr/local/bin/install2.sh: 67: cannot create /etc/mosquitto/conf.d/smartapplianceenabler.conf: Directory nonexistent + systemctl start mosquitto Failed to start mosquitto.service: Unit mosquitto.service not found. + systemctl enable mosquitto Failed to enable unit: Unit file mosquitto.service does not exist. + echo ********** Setting up user ... + mkdir /opt/sae + groupadd sae + useradd -d /opt/sae -c SmartApplianceEnabler -g sae -M sae -s /bin/bash + usermod -a -G gpio,sudo sae + echo sae + echo sae + passwd sae New password: Retype new password: passwd: password updated successfully + cp /home/pi/.profile /opt/sae + cp /home/pi/.bashrc /opt/sae + echo ********** Installing SAE ... + wget https://github.com/camueller/SmartApplianceEnabler/raw/master/run/smartapplianceenabler -P /opt/sae + chmod 755 /opt/sae/smartapplianceenabler + wget https://github.com/camueller/SmartApplianceEnabler/raw/master/run/etc/default/smartapplianceenabler -P /etc/default + chown root.root /etc/default/smartapplianceenabler chown: warning: '.' should be ':': ‘root.root’ + chmod 644 /etc/default/smartapplianceenabler + [ -n ] + wget https://github.com/camueller/SmartApplianceEnabler/raw/master/run/logback-spring.xml -P /opt/sae + chmod 644 /opt/sae/logback-spring.xml + curl -H+ jq -c .[] | select( .prerelease == false) | .tag_name Accept: application/vnd.github.v3+json/usr/local/bin/install2.sh: 1: jq: not found https://api.github.com/repos/camueller/SmartApplianceEnabler/releases + head -n 1 + tr -d " % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4396 0 4396 0 0 5284 0 --:--:-- --:--:-- --:--:-- 5290 curl: (23) Failure writing output to destination + SAE_VERSION= + wget https://github.com/camueller/SmartApplianceEnabler/releases/download//SmartApplianceEnabler-.war -P /opt/sae + chown -R sae:sae /opt/sae + echo ********** Configure systemd ... + wget https://github.com/camueller/SmartApplianceEnabler/raw/master/run/lib/systemd/system/smartapplianceenabler.service -P /lib/systemd/system + chown root.root /lib/systemd/system/smartapplianceenabler.service chown: warning: '.' should be ':': ‘root.root’ + chmod 755 /lib/systemd/system/smartapplianceenabler.service + systemctl enable smartapplianceenabler Created symlink /etc/systemd/system/multi-user.target.wants/smartapplianceenabler.service → /lib/systemd/system/smartapplianceenabler.service. + systemctl daemon-reload + echo ********** Starting SAE ... + systemctl start smartapplianceenabler Failed to start smartapplianceenabler.service: Unit mosquitto.service not found. + sleep 15 + systemctl status smartapplianceenabler + [ true = true ] + echo ********** Installing Webmin ... + wget https://sourceforge.net/projects/webadmin/files/webmin/2.105/webmin_2.105_all.deb/download -O /tmp/webmin_2.105_all.deb + dpkg -i /tmp/webmin_2.105_all.deb dpkg: dependency problems prevent configuration of webmin: webmin depends on libnet-ssleay-perl; however: Package libnet-ssleay-perl is not installed. webmin depends on libauthen-pam-perl; however: Package libauthen-pam-perl is not installed. webmin depends on libio-pty-perl; however: Package libio-pty-perl is not installed. dpkg: error processing package webmin (--install): dependency problems - leaving unconfigured Errors were encountered while processing: webmin + sudo systemctl start webmin Failed to start webmin.service: Unit webmin.service not found. + sleep 15 + sudo systemctl status webmin Unit webmin.service could not be found. + [ true = true ] + echo ********** Installing mbusd ... + cd /tmp + git clone https://github.com/camueller/mbusd.git /usr/local/bin/install2.sh: 124: git: not found + cd mbusd /usr/local/bin/install2.sh: 125: cd: can't cd to mbusd + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr .. /usr/local/bin/install2.sh: 128: cmake: not found + make make: *** No targets specified and no makefile found. Stop. + make install make: *** No rule to make target 'install'. Stop. + systemctl daemon-reload + cp /etc/mbusd/mbusd.conf.example /etc/mbusd/mbusd-ttyUSB0.conf cp: cannot stat '/etc/mbusd/mbusd.conf.example': No such file or directory + echo ********** Clean up installation files ... + rm -v /etc/rc.local + mv -v /etc/rc.local.bak /etc/rc.local mv: cannot stat '/etc/rc.local.bak': No such file or directory + rm -v /usr/local/etc/install.config + echo ********** /usr/local/bin/install2.sh finished /usr/local/bin/install2.sh: 143: cannot create /sys/class/leds/led1/brightness: Directory nonexistent + sleep 3600