From 3d9ffe7cc65100bf0b442f854237b32a8d465e2b Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 7 Nov 2024 17:22:24 -0500 Subject: [PATCH] Implement Attend Portal autologin --- bin/seagl-setup-app | 5 ++++- etc/firefox/policies/policies.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/seagl-setup-app b/bin/seagl-setup-app index 99c6b2e..d325019 100755 --- a/bin/seagl-setup-app +++ b/bin/seagl-setup-app @@ -28,9 +28,11 @@ function get_config_value() { jq -r $1 < /var/lib/seagl/config-data.json } +room_id="$(cat /var/lib/seagl/room-id)" + if [ "$arg" == obs ]; then keyset=$(cat /var/lib/seagl/rtmp-keyset) - rtmp_key=$(get_config_value .rtmpKeys.$keyset.$(cat /var/lib/seagl/room-id)) + rtmp_key=$(get_config_value .rtmpKeys.$keyset.$room_id) sed -i "s/__YOUTUBE_STREAM_KEY__/$rtmp_key/" ~/.var/app/com.obsproject.Studio/config/obs-studio/basic/profiles/Untitled/service.json start_and_link_app com.obsproject.Studio elif [ "$arg" == nextcloud ]; then @@ -39,6 +41,7 @@ elif [ "$arg" == nextcloud ]; then start_and_link_app com.nextcloud.desktopclient.nextcloud elif [ "$arg" == firefox ]; then sudo sed -i "s;AV_TEST_RESULTS_PLACEHOLDER;$(get_config_value .avTestResultsSheetURL);" /etc/firefox/policies/policies.json + sudo sed -i "s;__ATTEND_PORTAL_CREDENTIALS__=t;userId=%40$(get_config_value .matrixCredentials.$room_id.user)%3A2024.seagl.org&password=$(get_config_value .matrixCredentials.$room_id.password);" /etc/firefox/policies/policies.json start_and_link_app org.mozilla.firefox elif [ "$arg" == rclone ]; then rclone config create seagl_s3 s3 provider=AWS access_key_id=$(get_config_value .awsCreds.accessKey) secret_access_key=$(get_config_value .awsCreds.secretAccessKey) env_auth=false region=us-west-2 endpoint= location_constraint=us-west-2 acl=private diff --git a/etc/firefox/policies/policies.json b/etc/firefox/policies/policies.json index 9c6f31d..75f7ae4 100755 --- a/etc/firefox/policies/policies.json +++ b/etc/firefox/policies/policies.json @@ -3,7 +3,7 @@ "Bookmarks": [ { "Title": "Attend Portal", - "URL": "https://attend.seagl.org/", + "URL": "https://attend.seagl.org/?__ATTEND_PORTAL_CREDENTIALS__=t", "Placement": "toolbar" }, {