Skip to content

Commit

Permalink
fix mosquitto auth in firstboot
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Nov 29, 2022
1 parent fb56766 commit e1da6fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions workspace/scripts/files/bash/firstboot_leader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ crudini --set $PIO_DIR/config.ini cluster.topology leader_hostname "$(hostname)"
crudini --set $PIO_DIR/config.ini cluster.topology leader_address "$(hostname)".local

sqlite3 $DB_LOC "INSERT OR IGNORE INTO experiments (created_at, experiment, description) VALUES (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW'), 'Demo experiment', 'This is a demo experiment. Feel free to click around. When you are ready, click the [New experiment] above.');"
mosquitto_pub -t "pioreactor/latest_experiment/experiment" -m "Demo experiment" -r -q 1
mosquitto_pub -t "pioreactor/latest_experiment/created_at" -m "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" -r -q 1
mosquitto_pub -t "pioreactor/latest_experiment/experiment" -m "Demo experiment" -r -q 1 -u pioreactor -P raspberry
mosquitto_pub -t "pioreactor/latest_experiment/created_at" -m "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" -r -q 1 -u pioreactor -P raspberry
4 changes: 2 additions & 2 deletions workspace/scripts/files/bash/firstboot_leader_and_worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ crudini --set $PIO_DIR/config.ini cluster.topology leader_hostname $(hostname)
crudini --set $PIO_DIR/config.ini cluster.topology leader_address $(hostname).local

sqlite3 $DB_LOC "INSERT OR IGNORE INTO experiments (created_at, experiment, description) VALUES (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW'), 'Demo experiment', 'This is a demo experiment. Feel free to click around. When you are ready, click the [New experiment] above.');"
mosquitto_pub -t "pioreactor/latest_experiment/experiment" -m "Demo experiment" -r -q 1
mosquitto_pub -t "pioreactor/latest_experiment/created_at" -m $(date -u +"%Y-%m-%dT%H:%M:%SZ") -r -q 1
mosquitto_pub -t "pioreactor/latest_experiment/experiment" -m "Demo experiment" -r -q 1 -u pioreactor -P raspberry
mosquitto_pub -t "pioreactor/latest_experiment/created_at" -m $(date -u +"%Y-%m-%dT%H:%M:%SZ") -r -q 1 -u pioreactor -P raspberry



Expand Down
2 changes: 0 additions & 2 deletions workspace/scripts/files/sql/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ CREATE UNIQUE INDEX IF NOT EXISTS calibrations_ix
ON calibrations (pioreactor_unit, type, created_at);



-- this isn't being populated currently, maybe in the future...
CREATE TABLE IF NOT EXISTS pwm_dcs (
experiment TEXT NOT NULL,
pioreactor_unit TEXT NOT NULL,
Expand Down

0 comments on commit e1da6fe

Please sign in to comment.