diff --git a/scripts/openaps-boostrap.sh b/scripts/openaps-boostrap.sh deleted file mode 100644 index 31b2324ec..000000000 --- a/scripts/openaps-boostrap.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -( -echo Scanning for wifi networks: -ifup wlan0 -wpa_cli scan -echo -e "\nStrongest networks found:" -wpa_cli scan_res | sort -grk 3 | head | awk -F '\t' '{print $NF}' | uniq -set -e -echo -e /"\nWARNING: this script will back up and remove all of your current wifi configs." -read -p "Press Ctrl-C to cancel, or press Enter to continue:" -r -echo -e "\nNOTE: Spaces in your network name or password are ok. Do not add quotes." -read -p "Enter your network name: " -r -SSID=$REPLY -read -p "Enter your network password: " -r -PSK=$REPLY -cd /etc/network -cp interfaces interfaces.$(date +%s).bak -echo -e "auto lo\niface lo inet loopback\n\nauto usb0\niface usb0 inet static\n address 10.11.12.13\n netmask 255.255.255.0\n\nauto wlan0\niface wlan0 inet dhcp\n wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf" > interfaces -echo -e "\n/etc/network/interfaces:\n" -cat interfaces -cd /etc/wpa_supplicant/ -cp wpa_supplicant.conf wpa_supplicant.conf.$(date +%s).bak -echo -e "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nupdate_config=1\nnetwork={\n ssid=\"$SSID\"\n psk=\"$PSK\"\n}" > wpa_supplicant.conf -echo -e "\n/etc/wpa_supplicant/wpa_supplicant.conf:\n" -cat wpa_supplicant.conf -echo -e "\nAttempting to bring up wlan0:\n" -ifdown wlan0; ifup wlan0 -echo -ne "\nWifi SSID: "; iwgetid -r -sleep 5 -# TODO check for options to fix the certificate activation error message for https -cd /tmp/; wget --no-check-certificate https://raw.githubusercontent.com/openaps/docs/dev/scripts/openaps-install.sh; bash ./openaps-install.sh -) diff --git a/scripts/openaps-bootstrap.sh b/scripts/openaps-bootstrap.sh index d74b513d2..5546425fd 100644 --- a/scripts/openaps-bootstrap.sh +++ b/scripts/openaps-bootstrap.sh @@ -30,5 +30,6 @@ sleep 10 echo -ne "\nWifi SSID: "; iwgetid -r sleep 5 # TODO check for options to fix the certificate activation error message for https -cd /tmp/; wget --no-check-certificate https://raw.githubusercontent.com/openaps/docs/dev/scripts/openaps-install.sh; bash ./openaps-install.sh +# TODO: change back to dev after merging nodejs-6 to dev, then to master after docs release +cd /tmp/; wget --no-check-certificate https://raw.githubusercontent.com/openaps/docs/nodejs-6/scripts/openaps-install.sh; bash ./openaps-install.sh ) diff --git a/scripts/openaps-install.sh b/scripts/openaps-install.sh index cf890daf6..7016517ca 100644 --- a/scripts/openaps-install.sh +++ b/scripts/openaps-install.sh @@ -14,18 +14,21 @@ passwd -S edison | grep 20[01][0-6] && passwd -e edison -i 3 # set timezone dpkg-reconfigure tzdata +# TODO: remove this after Debian's IPv6 mirrors are stable again +mkdir -p /etc/apt/apt.conf.d/ +echo 'Acquire::ForceIPv4 "true";' | tee /etc/apt/apt.conf.d/99force-ipv4 + #dpkg -P nodejs nodejs-dev -# TODO: remove the `-o Acquire::ForceIPv4=true` once Debian's mirrors work reliably over IPv6 -apt-get -o Acquire::ForceIPv4=true update && apt-get -o Acquire::ForceIPv4=true -y dist-upgrade && apt-get -o Acquire::ForceIPv4=true -y autoremove -apt-get -o Acquire::ForceIPv4=true install -y sudo strace tcpdump screen acpid vim python-pip locate +apt-get update && apt-get -y dist-upgrade && apt-get -y autoremove +apt-get install -y sudo strace tcpdump screen acpid vim python-pip locate adduser edison sudo adduser edison dialout sed -i "s/daily/hourly/g" /etc/logrotate.conf sed -i "s/#compress/compress/g" /etc/logrotate.conf -# TODO: change back to master after docs release -curl -s https://raw.githubusercontent.com/openaps/docs/dev/scripts/quick-packages.sh | bash - +# TODO: change back to dev after merging nodejs-6 to dev, then to master after docs release +curl -s https://raw.githubusercontent.com/openaps/docs/nodejs-6/scripts/quick-packages.sh | bash - mkdir -p ~/src; cd ~/src && git clone git://github.com/openaps/oref0.git || (cd oref0 && git checkout master && git pull) echo "Press Enter to run oref0-setup with the current release (master branch) of oref0," read -p "or press ctrl-c to cancel. " -r diff --git a/scripts/quick-packages.sh b/scripts/quick-packages.sh index 21e25fa8d..149da475f 100644 --- a/scripts/quick-packages.sh +++ b/scripts/quick-packages.sh @@ -1,14 +1,15 @@ #!/bin/bash -# TODO: remove the `-o Acquire::ForceIPv4=true` once Debian's mirrors work reliably over IPv6 -apt-get -o Acquire::ForceIPv4=true install -y sudo -sudo apt-get -o Acquire::ForceIPv4=true update && sudo apt-get -o Acquire::ForceIPv4=true -y upgrade -sudo apt-get -o Acquire::ForceIPv4=true install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy npm watchdog strace tcpdump screen acpid vim locate jq lm-sensors && \ +apt-get install -y sudo +sudo apt-get update && sudo apt-get -y upgrade +# install nodejs 6.x instead of the old 0.10 that debian defaults to +curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - +sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs watchdog strace tcpdump screen acpid vim locate jq lm-sensors mosh && \ sudo pip install -U openaps && \ sudo pip install -U openaps-contrib && \ sudo openaps-install-udev-rules && \ sudo activate-global-python-argcomplete && \ -sudo npm install -g json oref0 && \ +sudo npm install -g json oref0 2>&1 | cat && \ echo openaps installed && \ openaps --version diff --git a/scripts/quick-src.sh b/scripts/quick-src.sh index 85753e17c..43cccd0d6 100644 --- a/scripts/quick-src.sh +++ b/scripts/quick-src.sh @@ -2,7 +2,7 @@ apt-get install -y sudo sudo apt-get update -sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy npm watchdog strace tcpdump screen acpid vim locate jq lm-sensors && \ +sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy npm watchdog strace tcpdump screen acpid vim locate jq lm-sensors mosh && \ ( curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python ) && \ sudo npm install -g json && \ sudo easy_install -ZU setuptools && \