From 64a29dd173b74c05d3fd546945b07388a1bcf9b1 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Thu, 22 Feb 2024 15:16:37 -0500 Subject: [PATCH] a few more optimizations --- workspace/scripts/03-configure-rpi.sh | 10 +++++++--- workspace/scripts/files/bash/local_access_point.sh | 4 ++-- workspace/scripts/files/config.example.ini | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/workspace/scripts/03-configure-rpi.sh b/workspace/scripts/03-configure-rpi.sh index 9e85506..e540be0 100644 --- a/workspace/scripts/03-configure-rpi.sh +++ b/workspace/scripts/03-configure-rpi.sh @@ -49,7 +49,7 @@ if [ "$WORKER" == "1" ]; then sudo systemctl disable hciuart echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt sudo systemctl disable bluetooth.service - + sudo apt remove --purge bluez -y sudo systemctl disable keyboard-setup.service fi @@ -87,17 +87,21 @@ sudo systemctl disable alsa-restore.service sudo systemctl disable alsa-state.service sudo systemctl disable userconfig.service +sudo systemctl mask apt-daily-upgrade +sudo systemctl mask apt-daily +sudo systemctl disable apt-daily-upgrade.timer +sudo systemctl disable apt-daily.timer # turn off ipv6 -# File to be modified file="/etc/sysctl.d/90-disable-ipv6.conf" -# Lines to be added lines="net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1" echo "$lines" | sudo tee "$file" > /dev/null +# remove man page refreshes +sudo rm /var/lib/man-db/auto-update diff --git a/workspace/scripts/files/bash/local_access_point.sh b/workspace/scripts/files/bash/local_access_point.sh index 8bff376..bbecc08 100644 --- a/workspace/scripts/files/bash/local_access_point.sh +++ b/workspace/scripts/files/bash/local_access_point.sh @@ -7,7 +7,7 @@ export LC_ALL=C rfkill unblock wifi for filename in /var/lib/systemd/rfkill/*:wlan ; do - echo 0 > $filename + echo 0 > "$filename" done iw reg set "$(head -c 2 /boot/firmware/local_access_point)" @@ -15,7 +15,7 @@ iw reg set "$(head -c 2 /boot/firmware/local_access_point)" sudo nmcli connection delete PioreactorAP || true -sudo nmcli connection add type wifi con-name PioreactorAP autoconnect no wifi.mode ap wifi.ssid $(crudini --get /home/pioreactor/.pioreactor/config.ini local_access_point ssid) ipv4.method shared ipv6.method disabled +sudo nmcli connection add type wifi con-name PioreactorAP autoconnect no wifi.mode ap wifi.ssid "$(crudini --get /home/pioreactor/.pioreactor/config.ini local_access_point ssid)" ipv4.method shared ipv6.method disabled sudo nmcli connection modify PioreactorAP 802-11-wireless-security.key-mgmt wpa-psk sudo nmcli connection modify PioreactorAP 802-11-wireless-security.proto "$(crudini --get /home/pioreactor/.pioreactor/config.ini local_access_point proto 2> /dev/null || echo 'rsn')" diff --git a/workspace/scripts/files/config.example.ini b/workspace/scripts/files/config.example.ini index 684f50c..6f19d5a 100644 --- a/workspace/scripts/files/config.example.ini +++ b/workspace/scripts/files/config.example.ini @@ -139,7 +139,7 @@ pause_between_subdoses_seconds=5 waste_removal_multiplier=2 max_volume_to_warn=17.0 max_volume_to_stop=18.0 -max_subdose=0.75 +max_subdose=1.0 [dosing_automation.pid_morbidostat]