diff --git a/workspace/scripts/01-make-pioreactor-user.sh b/workspace/scripts/01-make-pioreactor-user.sh index 72bf125..4eafaa3 100644 --- a/workspace/scripts/01-make-pioreactor-user.sh +++ b/workspace/scripts/01-make-pioreactor-user.sh @@ -11,6 +11,7 @@ install_cleanup_trap USERNAME=pioreactor PASS=raspberry +SSH_DIR=/home/$USERNAME/.ssh adduser --gecos "" --disabled-password $USERNAME chpasswd <<<"$USERNAME:$PASS" @@ -41,4 +42,11 @@ chmod 755 /home/$USERNAME # change default password for the pi user, as per RPi Foundations recommendation. Not sure if this works... chpasswd <<<"pi:notaraspberry" -rm /etc/ssh/sshd_config.d/rename_user.conf \ No newline at end of file +rm /etc/ssh/sshd_config.d/rename_user.conf + +##### set some SSH stuff, populated on firstboot. +sudo -u $USERNAME rm -rf $SSH_DIR # remove if already exists. + +sudo -u $USERNAME mkdir -p $SSH_DIR +sudo cp /files/ssh_config $SSH_DIR/config +sudo chown pioreactor:pioreactor $SSH_DIR/config \ No newline at end of file diff --git a/workspace/scripts/02-install-python-and-pip.sh b/workspace/scripts/02-install-python-and-pip.sh index 1eeb015..a36e88d 100644 --- a/workspace/scripts/02-install-python-and-pip.sh +++ b/workspace/scripts/02-install-python-and-pip.sh @@ -11,19 +11,18 @@ install_cleanup_trap USERNAME=pioreactor -SSH_DIR=/home/$USERNAME/.ssh apt-get install -y python3-pip apt-get install -y python3-dev # needed to build CLoader in pyyaml sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED || true # see jeff gerlings blog post sudo pip3 install pip -U # update to latest + +# these live in /root/.config/pip/pip.conf sudo pip3 config set global.disable-pip-version-check true # don't check for latest pip sudo pip3 config set global.root-user-action "ignore" +sudo pip3 config set global.extra-index-url 'https://www.piwheels.org/simple' -sudo -u $USERNAME rm -rf $SSH_DIR # remove if already exists. -sudo -u $USERNAME mkdir -p $SSH_DIR -sudo cp /files/ssh_config $SSH_DIR/config diff --git a/workspace/scripts/files/bash/update_ui.sh b/workspace/scripts/files/bash/update_ui.sh index c1fa984..2553bf9 100644 --- a/workspace/scripts/files/bash/update_ui.sh +++ b/workspace/scripts/files/bash/update_ui.sh @@ -38,3 +38,10 @@ rm -rf $UI_FOLDER mkdir $UI_FOLDER cp -rp $WORK_DIR/. $UI_FOLDER chgrp -R www-data $UI_FOLDER + +ENV=$UI_FOLDER/.env +if [ -f "$ENV" ]; then + echo "$FILE exists." +else + mv $UI_FOLDER/.env.example ENV +fi diff --git a/workspace/scripts/files/config.example.ini b/workspace/scripts/files/config.example.ini index 3056752..ac6bf34 100644 --- a/workspace/scripts/files/config.example.ini +++ b/workspace/scripts/files/config.example.ini @@ -124,6 +124,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 [dosing_automation.pid_morbidostat] @@ -155,7 +156,6 @@ rate_std=0.20 ekf_variance_shift_post_dosing_minutes=0.40 ekf_variance_shift_post_dosing_factor=2500 - [data_sharing_with_pioreactor] # This enables sending error logs back to us developers at Pioreactor. # (switch to 1 to enable sending, 0 to disable any sending)