-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ef93a3
commit 304b09b
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,7 @@ chown -R pioreactor:www-data $DB* | |
chmod -R 770 $DB* | ||
|
||
# 2. make a calibration dir in all pioreactors | ||
sudo -u pioreactor mkdir -p "$STORAGE_DIR"/calibrations/od | ||
sudo -u pioreactor mkdir -p "$STORAGE_DIR"/calibrations/media_pump | ||
sudo -u pioreactor mkdir -p "$STORAGE_DIR"/calibrations/waste_pump | ||
sudo -u pioreactor mkdir -p "$STORAGE_DIR"/calibrations/alt_media_pump | ||
sudo -u pioreactor mkdir -p "$STORAGE_DIR"/calibrations/{od,media_pump,waste_pump,alt_media_pump} | ||
|
||
# 3. install pyyaml (only leader has it, but workers need it now) | ||
sudo pip3 install "$SCRIPT_DIR"/PyYAML-6.0.2-cp311-cp311-linux_armv7l.whl | ||
|
@@ -37,7 +34,7 @@ sudo bash /usr/local/bin/create_diskcache.sh | |
# 5. replace old calibrations with new yaml files. This doesn't delete old calibrations | ||
sudo -u pioreactor python "$SCRIPT_DIR"/cal_convert.py "$STORAGE_DIR"/od_calibrations/cache.db | ||
sudo -u pioreactor python "$SCRIPT_DIR"/cal_convert.py "$STORAGE_DIR"/pump_calibrations/cache.db | ||
chown -R pioreactor:pioreactor "$STORAGE_DIR"/calibrations/*/*.yaml | ||
chown -R pioreactor:pioreactor "$STORAGE_DIR"/calibrations/ | ||
|
||
sudo -u pioreactor python "$SCRIPT_DIR"/cal_active.py "$STORAGE_DIR"/current_pump_calibrations/cache.db | ||
sudo -u pioreactor python "$SCRIPT_DIR"/cal_active.py "$STORAGE_DIR"/current_od_calibrations/cache.db | ||
|
@@ -48,16 +45,9 @@ if [ "$HOSTNAME" = "$LEADER_HOSTNAME" ]; then | |
# 6. remove calibrations dataset file | ||
rm -f /home/pioreactor/.pioreactor/exportable_datasets/*calibrations.yaml | ||
|
||
|
||
# 7. fix any bad pioreactor start up systemd services | ||
rm -f /usr/lib/systemd/system/[email protected] | ||
cp "$SCRIPT_DIR"/[email protected] /etc/systemd/system/ | ||
echo "application/yaml yaml yml" | sudo tee -a /etc/mime.types | ||
|
||
# 8. add new config entries | ||
crudini --set /home/pioreactor/.pioreactor/config.ini storage temporary_cache /tmp/pioreactor_cache/local_intermittent_pioreactor_metadata.sqlite \ | ||
--set /home/pioreactor/.pioreactor/config.ini storage persistent_cache /home/pioreactor/.pioreactor/storage/local_persistent_pioreactor_metadata.sqlite | ||
|
||
sudo -u pioreactor pios sync-configs --shared || : | ||
|
||
fi |