├── .gitignore ├── scripts ├── apt-get-dist-upgrade ├── update-node-red ├── move-pi-home-to-usb ├── apt-get-install ├── configure-wifi ├── install-bluez-5 ├── install-godaddy-c2-ca-root-cert-g2 ├── configure-collectd-librato ├── install-mosquitto ├── install-node-red ├── install-nodejs ├── install-bluepy ├── install-noip-client └── configure-collectd ├── config └── pi.template ├── README.md └── recipes └── mkpi /.gitignore: -------------------------------------------------------------------------------- 1 | /config/** 2 | !/config/pi.template 3 | -------------------------------------------------------------------------------- /scripts/apt-get-dist-upgrade: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | export DEBIAN_FRONTEND=noninteractive 7 | /usr/bin/sudo /usr/bin/apt-get --quiet update 8 | /usr/bin/sudo /usr/bin/apt-get --quiet --yes --no-install-recommends --purge dist-upgrade 9 | -------------------------------------------------------------------------------- /scripts/update-node-red: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | /usr/bin/sudo npm update --global node-red pm2 \ 7 | node-red-contrib-bean \ 8 | node-red-node-sensortag \ 9 | node-red-contrib-sparkcore \ 10 | node-red-contrib-collectd \ 11 | node-red-contrib-librato 12 | 13 | # https://github.com/sandeepmistry/noble#running-on-linux 14 | /usr/bin/find "`npm prefix --global`/lib/node_modules" \ 15 | -path '*noble*Release/hci-ble' \ 16 | -print \ 17 | -exec /usr/bin/sudo /sbin/setcap cap_net_raw+eip '{}' \; 18 | 19 | pm2 updatePM2 20 | pm2 restart node-red 21 | -------------------------------------------------------------------------------- /scripts/move-pi-home-to-usb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | /usr/bin/sudo /bin/mkdir --parents /mnt/usb/ 7 | 8 | pushd /etc/ 9 | 10 | [ -f fstab.DEFAULT ] || /usr/bin/sudo /bin/cp fstab fstab.DEFAULT 11 | 12 | /bin/grep --quiet '/mnt/usb' fstab || /usr/bin/sudo /usr/bin/tee --append fstab <<\EOF 13 | /dev/sda1 /mnt/usb ext4 defaults,noatime 0 2 14 | EOF 15 | 16 | popd 17 | 18 | /usr/bin/sudo /usr/bin/tee /etc/cron.d/pi <<\EOF 19 | # m h dom mon dow user command 20 | @reboot root /usr/sbin/usermod --home /mnt/usb/pi pi && /bin/rm --force /etc/cron.d/pi 21 | EOF 22 | 23 | /usr/bin/sudo /sbin/reboot 24 | -------------------------------------------------------------------------------- /scripts/apt-get-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | if [ -z "$PACKAGES" ]; then 7 | echo "Usage: scripts/apt-get-install --env \"PACKAGES=[package-name...] [OPTIONAL_PACKAGES=[package-name...]]\"" 8 | exit 1 9 | fi 10 | 11 | export DEBIAN_FRONTEND=noninteractive 12 | /usr/bin/sudo /usr/bin/apt-get --quiet update 13 | 14 | if [ -n "$OPTIONAL_PACKAGES" ]; then 15 | for package in "$OPTIONAL_PACKAGES"; do 16 | /usr/bin/dpkg --print-avail $package &> /dev/null && PACKAGES="$package $PACKAGES" 17 | done 18 | fi 19 | 20 | /usr/bin/sudo /usr/bin/apt-get --quiet --yes --no-install-recommends install $PACKAGES 21 | -------------------------------------------------------------------------------- /scripts/configure-wifi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | if [ -z "$WIFI_SSID" -o -z "$WIFI_PASSWORD" ]; then 7 | echo "Usage: scripts/configure-wifi --env \"WIFI_SSID=[ssid] WIFI_PASSWORD=[password]\"" 8 | exit 1 9 | fi 10 | 11 | wpa_supplicant="/etc/wpa_supplicant/wpa_supplicant.conf" 12 | 13 | [ -f "${wpa_supplicant}.DEFAULT" ] || /usr/bin/sudo /bin/cp --archive "$wpa_supplicant" "${wpa_supplicant}.DEFAULT" 14 | # TODO make idempotent 15 | /usr/bin/wpa_passphrase "$WIFI_SSID" "$WIFI_PASSWORD" | /usr/bin/sudo /usr/bin/tee --append "$wpa_supplicant" 16 | 17 | /usr/bin/sudo /usr/bin/killall -HUP wpa_supplicant || /bin/true 18 | -------------------------------------------------------------------------------- /scripts/install-bluez-5: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | if [ -z "$BLUEZ_VERSION" ]; then 7 | echo "Usage: scripts/install-bluez-5 --env \"BLUEZ_VERSION=[version]\"" 8 | exit 1 9 | fi 10 | 11 | pushd /usr/local/src 12 | 13 | /usr/bin/sudo /usr/bin/curl --location --remote-name --silent "http://www.kernel.org/pub/linux/bluetooth/bluez-${BLUEZ_VERSION}.tar.xz" 14 | /usr/bin/sudo /bin/tar xf "bluez-${BLUEZ_VERSION}.tar.xz" 15 | 16 | pushd "bluez-${BLUEZ_VERSION}" 17 | 18 | /usr/bin/sudo ./configure --disable-systemd --enable-library 19 | /usr/bin/sudo /usr/bin/make 20 | /usr/bin/sudo /usr/bin/make install 21 | 22 | popd 23 | 24 | popd 25 | -------------------------------------------------------------------------------- /scripts/install-godaddy-c2-ca-root-cert-g2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | pushd /tmp/ 7 | 8 | /usr/bin/curl --location --remote-name --silent 'https://certs.godaddy.com/repository/gdroot-g2.crt' 9 | 10 | for cacerts in `/usr/bin/find /usr/lib/jvm -type f -name cacerts`; do 11 | /usr/bin/keytool -list -alias gdroot-g2 -keystore "$cacerts" -storepass changeit && continue 12 | 13 | [ -f "${cacerts}.DEFAULT" ] || /usr/bin/sudo /bin/cp "$cacerts" "${cacerts}.DEFAULT" 14 | /usr/bin/sudo /usr/bin/keytool -import -noprompt -file gdroot-g2.crt -alias gdroot-g2 -trustcacerts -keystore "$cacerts" -storepass changeit 15 | done 16 | 17 | popd 18 | -------------------------------------------------------------------------------- /scripts/configure-collectd-librato: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | if [ -z "$LIBRATO_USERNAME" -o -z "$LIBRATO_PASSWORD" ]; then 7 | echo "Usage: scripts/configure-collectd-librato --env \"LIBRATO_USERNAME=[username] LIBRATO_PASSWORD=[password]\"" 8 | exit 1 9 | fi 10 | 11 | pushd /etc/collectd.d/ 12 | 13 | /usr/bin/sudo /usr/bin/tee librato.conf < 16 | 17 | User "$LIBRATO_USERNAME" 18 | Password "$LIBRATO_PASSWORD" 19 | Format "JSON" 20 | 21 | 22 | EOF 23 | 24 | popd 25 | 26 | /usr/bin/sudo /etc/init.d/collectd restart 27 | -------------------------------------------------------------------------------- /scripts/install-mosquitto: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | pushd /tmp/ 7 | 8 | /usr/bin/curl --location --remote-name --silent 'http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key' 9 | /usr/bin/sudo /usr/bin/apt-key add mosquitto-repo.gpg.key 10 | 11 | popd 12 | 13 | pushd /etc/apt/sources.list.d/ 14 | 15 | release="`/usr/bin/lsb_release --codename --short`" 16 | /usr/bin/sudo /usr/bin/curl --location --remote-name --silent "http://repo.mosquitto.org/debian/mosquitto-$release.list" 17 | 18 | popd 19 | 20 | export DEBIAN_FRONTEND=noninteractive 21 | /usr/bin/sudo /usr/bin/apt-get --quiet update 22 | /usr/bin/sudo /usr/bin/apt-get --quiet --yes --no-install-recommends install mosquitto mosquitto-clients 23 | -------------------------------------------------------------------------------- /scripts/install-node-red: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | /usr/bin/sudo npm install --global node-red pm2 \ 7 | node-red-contrib-bean \ 8 | node-red-node-sensortag \ 9 | node-red-contrib-sparkcore \ 10 | node-red-contrib-collectd \ 11 | node-red-contrib-librato 12 | 13 | # https://github.com/sandeepmistry/noble#running-on-linux 14 | /usr/bin/find "`npm prefix --global`/lib/node_modules" \ 15 | -path '*noble*Release/hci-ble' \ 16 | -print \ 17 | -exec /usr/bin/sudo /sbin/setcap cap_net_raw+eip '{}' \; 18 | 19 | # Immediately start node-red 20 | pm2 delete node-red || /bin/true 21 | pm2 start "`/usr/bin/which node-red`" --node-args='--max-old-space-size=128' -- -v 22 | 23 | # Register node-red to be started at startup 24 | /usr/bin/sudo pm2 startup linux -u "$USER" 25 | -------------------------------------------------------------------------------- /scripts/install-nodejs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | if [ -z "$NODEJS_VERSION" ]; then 7 | echo "Usage: scripts/install-nodejs --env \"NODEJS_VERSION=[latest|version]\"" 8 | exit 1 9 | fi 10 | 11 | export DEBIAN_FRONTEND=noninteractive 12 | 13 | pushd /tmp/ 14 | 15 | if [ "`uname -m`" = 'armv6l' ]; then 16 | # http://node-arm.herokuapp.com/ 17 | /usr/bin/curl --location --remote-name --silent "http://node-arm.herokuapp.com/node_${NODEJS_VERSION}_armhf.deb" 18 | /usr/bin/sudo /usr/bin/dpkg --install "node_${NODEJS_VERSION}_armhf.deb" 19 | else 20 | # TODO respect $NODEJS_VERSION 21 | # https://github.com/nodesource/distributions#deb 22 | /usr/bin/curl --silent --location 'https://deb.nodesource.com/setup' | /usr/bin/sudo bash - 23 | /usr/bin/sudo /usr/bin/apt-get --quiet --yes --no-install-recommends install nodejs 24 | fi 25 | 26 | popd 27 | 28 | /usr/bin/sudo npm update --global npm 29 | -------------------------------------------------------------------------------- /scripts/install-bluepy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | 7 | if [ -z "$BLUEPY_VERSION" ]; then 8 | echo "Usage: scripts/install-bluepy --env \"BLUEPY_VERSION=[hash]\"" 9 | exit 1 10 | fi 11 | 12 | pushd /usr/local/src 13 | 14 | # TODO add support for "latest" using `git clone` (https://github.com/IanHarvey/bluepy#installation) 15 | /usr/bin/sudo /usr/bin/curl --location --output bluepy.tar.gz --silent https://github.com/IanHarvey/bluepy/tarball/${BLUEPY_VERSION} 16 | /usr/bin/sudo /bin/tar xf bluepy.tar.gz 17 | 18 | pushd "IanHarvey-bluepy-${BLUEPY_VERSION}/bluepy" 19 | 20 | /usr/bin/sudo /usr/bin/make 21 | /usr/bin/sudo /bin/cp bluepy-helper btle.py sensortag.py /usr/local/lib/python2.7/site-packages/ 22 | 23 | # Append site-packages to PYTHONPATH globally 24 | if /bin/grep --quiet '^PYTHONPATH' /etc/environment; then 25 | /usr/bin/sudo /bin/sed -i 's|^PYTHONPATH.*|PYTHONPATH="/usr/local/lib/python2.7/site-packages/"|' /etc/environment 26 | else 27 | /bin/echo 'PYTHONPATH="/usr/local/lib/python2.7/site-packages/"' | /usr/bin/sudo tee --append /etc/environment > /dev/null 28 | fi 29 | 30 | popd 31 | 32 | popd 33 | -------------------------------------------------------------------------------- /config/pi.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | # if "yes", add public key below to `pi` user `authorized_keys` 7 | PUBLIC_KEY= 8 | PUBLIC_KEY_FILE= 9 | PRIVATE_KEY_FILE= 10 | 11 | # if "yes", configure Collectd (https://collectd.org/) to push metrics to Librato (https://www.librato.com/) 12 | LIBRATO= 13 | LIBRATO_USERNAME= 14 | LIBRATO_PASSWORD= 15 | 16 | # if "yes", install and configure NoIP Dynamic DNS Update Client (https://www.noip.com/) 17 | NOIP= 18 | NOIP_USERNAME= 19 | NOIP_PASSWORD= 20 | 21 | # if "yes", configure WPA supplicant to connect to SSID below 22 | WIFI= 23 | WIFI_SSID= 24 | WIFI_PASSWORD= 25 | 26 | # if "yes", disable password-based logins to `pi` user 27 | LOCK_PI= 28 | 29 | # if "yes", install BlueZ (http://www.bluez.org/) 30 | BLUEZ= 31 | BLUEZ_VERSION=5.30 32 | 33 | # if "yes", install Bluepy (https://github.com/IanHarvey/bluepy) 34 | BLUEPY= 35 | BLUEPY_VERSION=b9d3fba 36 | 37 | # if "yes", install Node.js (https://nodejs.org/) and NPM (https://www.npmjs.com/) 38 | NODEJS= 39 | NODEJS_VERSION=0.10.36 40 | 41 | # if "yes", install Node-RED (http://nodered.org/) 42 | NODE_RED= 43 | 44 | # if "yes", install Mosquitto (http://mosquitto.org/) 45 | MOSQUITTO= 46 | -------------------------------------------------------------------------------- /scripts/install-noip-client: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | if [ -z "$NOIP_USERNAME" -o -z "$NOIP_PASSWORD" ]; then 7 | echo "Usage: scripts/configure-noip-client --env \"NOIP_USERNAME=[username] NOIP_PASSWORD=[password]\"" 8 | exit 1 9 | fi 10 | 11 | pushd /usr/local/src/ 12 | 13 | /usr/bin/sudo /usr/bin/curl --location --remote-name --silent 'http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz' 14 | /usr/bin/sudo /bin/tar zxf noip-duc-linux.tar.gz 15 | 16 | pushd noip-2.1.9* 17 | 18 | /usr/bin/sudo /usr/bin/make 19 | 20 | # /usr/bin/sudo /usr/bin/make install 21 | /usr/bin/sudo /bin/cp noip2 /usr/local/bin/ 22 | 23 | echo '######################################################################################' 24 | echo 'To configure the No-IP Dynamic Update Client, SSH to this instance and run:' 25 | echo "/usr/bin/sudo /usr/local/bin/noip2 -C -F -U 30 -u '$NOIP_USERNAME' -p '$NOIP_PASSWORD'" 26 | echo '/usr/bin/sudo /usr/local/bin/noip2 -M' 27 | echo '######################################################################################' 28 | 29 | popd 30 | 31 | popd 32 | 33 | /usr/bin/sudo /usr/bin/tee /etc/cron.d/no-ip2 <<\EOF 34 | # m h dom mon dow user command 35 | @reboot root /usr/local/bin/noip2 -M 36 | EOF 37 | -------------------------------------------------------------------------------- /scripts/configure-collectd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | default_gateway="`/sbin/ip route | awk '/default/ { print $3 }'`" 7 | 8 | pushd /etc/collectd/ 9 | 10 | [ -f collectd.conf.DEFAULT ] || /usr/bin/sudo /bin/cp collectd.conf collectd.conf.DEFAULT 11 | 12 | /usr/bin/sudo /bin/sed --in-place \ 13 | --expression='s/^LoadPlugin rrdtool$/#LoadPlugin rrdtool/' \ 14 | --expression='s/^#Interval 10$/Interval 60/' \ 15 | /etc/collectd/collectd.conf 16 | 17 | /bin/grep --quiet 'Include "/etc/collectd\.d/\*\.conf"' collectd.conf || /usr/bin/sudo /usr/bin/tee --append collectd.conf <<\EOF 18 | Include "/etc/collectd.d/*.conf" 19 | EOF 20 | 21 | popd 22 | 23 | [ -d /etc/collectd.d/ ] || /usr/bin/sudo /bin/mkdir /etc/collectd.d/ 24 | 25 | pushd /etc/collectd.d/ 26 | 27 | /usr/bin/sudo /usr/bin/tee ping.conf < 31 | Host "$default_gateway" 32 | Host "google.com" 33 | 34 | EOF 35 | 36 | /usr/bin/sudo /usr/bin/tee unixsock.conf <<\EOF 37 | # https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_unixsock 38 | LoadPlugin unixsock 39 | 40 | SocketFile "/var/run/collectd-unixsock" 41 | SocketPerms "0666" 42 | DeleteSocket true 43 | 44 | EOF 45 | 46 | popd 47 | 48 | /usr/bin/sudo /etc/init.d/collectd restart 49 | /usr/bin/sudo /bin/rm --force --recursive /var/lib/collectd/rrd/ 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Raspberry Pi Recipes 2 | ==================== 3 | 4 | ## What's this repo all about? 5 | 6 | This project contains [Overcast](http://andrewchilds.github.io/overcast/) scripts to automatically configure your Raspberry Pis _remotely_, including: 7 | 8 | - Add your public key to `authorized_keys` 9 | - Update installed packages to the latest and greatest 10 | - Add the [GoDaddy Class 2 Certification Authority Root Certificate - G2](https://certs.godaddy.com/repository) to your Java CA Certificates Store 11 | - Install [Collectd](https://collectd.org/) 12 | - Configure Collectd metrics to forward to [Librato](https://www.librato.com/) 13 | - Install the [No-IP](http://www.noip.com/) Dynamic Update Client 14 | - Configure [WPA Supplicant](http://w1.fi/wpa_supplicant/) to connect to your WiFi SSID (requires USB WiFi adapter) 15 | - Install [BlueZ 5](http://www.bluez.org/) (requires USB Bluetooth adapter) 16 | - Install [Bluepy](https://github.com/IanHarvey/bluepy) (requires USB Bluetooth adapter) 17 | - Install [Node.js](http://nodejs.org/) 18 | - Install [Node-RED](http://nodered.org/) with basic nodes 19 | - Install [Mosquitto](http://mosquitto.org/) 20 | - Disable password-based authentication for the `pi` user account 21 | 22 | Note that each of these tools is _**optional**_ and controlled by a flag (see [config/pi.template](https://github.com/garnold/raspberry-pi-recipes/blob/master/config/pi.template)). 23 | 24 | Also note that 99.999% of the recipe is _not_ Pi-specific, and as such it can be used to configure any [Debian GNU/Linux](https://www.debian.org/)-based distribution. We've used it to configure a Debian guest running under [VirtualBox](https://www.virtualbox.org/) on OSX. 25 | 26 | # Using 27 | 28 | 35 | 36 | 37 | 38 | ## Install Overcast on your local machine 39 | 40 | $ npm install --global overcast 41 | 42 | ## Import your Pi into Overcast 43 | 44 | $ overcast instance import my-pi 1.2.3.4 --user pi 45 | 46 | ## Customize the configuration 47 | 48 | $ cp config/pi.template config/my-pi 49 | $ vi config/my-pi 50 | 51 | ## Make Pi 52 | 53 | $ ./recipes/mkpi my-pi config/my-pi --password raspberry 54 | -------------------------------------------------------------------------------- /recipes/mkpi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # set -x 5 | 6 | basedir="`dirname $0`/.." 7 | run_on="$1" 8 | config="$2" 9 | 10 | if [ -z "$run_on" -o -z "$config" -o ! -f "$config" ]; then 11 | echo "Usage: recipes/mkpi [instance|cluster|all] [config]" 12 | exit 1 13 | else 14 | shift 15 | shift 16 | fi 17 | 18 | source "$config" 19 | 20 | if [ "$PUBLIC_KEY" = "yes" ]; then 21 | overcast key push "$run_on" "$PUBLIC_KEY_FILE" --append "$@" 22 | 23 | # Not propagating script args (`"$@"`) to ensure `--password ''` option is not clobbered 24 | overcast instance update "$run_on" --ssh-key "$PRIVATE_KEY_FILE" --password '' 25 | fi 26 | 27 | overcast run "$run_on" "$basedir/scripts/apt-get-dist-upgrade" "$@" 28 | 29 | if [ "$BLUEZ" = "yes" ]; then 30 | PACKAGES="libusb-dev libdbus-1-dev libglib2.0-dev automake libudev-dev libical-dev libreadline-dev $PACKAGES" 31 | fi 32 | 33 | if [ "$BLUEPY" = "yes" ]; then 34 | PACKAGES="libglib2.0-dev libdbus-1-dev $PACKAGES" 35 | fi 36 | 37 | if [ "$NODEJS" = "yes" ]; then 38 | PACKAGES="build-essential $PACKAGES" 39 | fi 40 | 41 | if [ "$NODE_RED" = "yes" ]; then 42 | PACKAGES="build-essential python-dev libcap2-bin $PACKAGES" 43 | OPTIONAL_PACKAGES="python-rpi.gpio $OPTIONAL_PACKAGES" 44 | fi 45 | 46 | overcast run "$run_on" "$basedir/scripts/apt-get-install" --env "PACKAGES=\"curl git htop zip collectd liboping0 lsb-release $PACKAGES\" OPTIONAL_PACKAGES=\"$OPTIONAL_PACKAGES\"" "$@" 47 | 48 | overcast run "$run_on" "$basedir/scripts/install-godaddy-c2-ca-root-cert-g2" "$@" 49 | 50 | overcast run "$run_on" "$basedir/scripts/configure-collectd" "$@" 51 | 52 | if [ "$LIBRATO" = "yes" ]; then 53 | overcast run "$run_on" "$basedir/scripts/configure-collectd-librato" --env "LIBRATO_USERNAME=\"$LIBRATO_USERNAME\" LIBRATO_PASSWORD=\"$LIBRATO_PASSWORD\"" "$@" 54 | fi 55 | 56 | if [ "$NOIP" = "yes" ]; then 57 | overcast run "$run_on" "$basedir/scripts/install-noip-client" --env "NOIP_USERNAME=\"$NOIP_USERNAME\" NOIP_PASSWORD=\"$NOIP_PASSWORD\"" "$@" 58 | fi 59 | 60 | if [ "$WIFI" = "yes" ]; then 61 | overcast run "$run_on" "$basedir/scripts/configure-wifi" --env "WIFI_SSID=\"$WIFI_SSID\" WIFI_PASSWORD=\"$WIFI_PASSWORD\"" "$@" 62 | fi 63 | 64 | if [ "$BLUEZ" = "yes" ]; then 65 | overcast run "$run_on" "$basedir/scripts/install-bluez-5" --env "BLUEZ_VERSION=\"$BLUEZ_VERSION\"" "$@" 66 | fi 67 | 68 | if [ "$BLUEPY" = "yes" ]; then 69 | overcast run "$run_on" "$basedir/scripts/install-bluepy" --env "BLUEPY_VERSION=\"$BLUEPY_VERSION\"" "$@" 70 | fi 71 | 72 | if [ "$NODEJS" = "yes" ]; then 73 | overcast run "$run_on" "$basedir/scripts/install-nodejs" --env "NODEJS_VERSION=\"$NODEJS_VERSION\"" "$@" 74 | fi 75 | 76 | if [ "$NODE_RED" = "yes" ]; then 77 | overcast run "$run_on" "$basedir/scripts/install-node-red" "$@" 78 | fi 79 | 80 | if [ "$MOSQUITTO" = "yes" ]; then 81 | overcast run "$run_on" "$basedir/scripts/install-mosquitto" "$@" 82 | fi 83 | 84 | # This should remain last to ensure passwordless SSH is available throughout the install process 85 | if [ "$LOCK_PI" = "yes" ]; then 86 | overcast run "$run_on" 'sudo usermod --lock $USER' "$@" 87 | fi 88 | --------------------------------------------------------------------------------