Skip to content

Commit

Permalink
Implement Attend Portal autologin
Browse files Browse the repository at this point in the history
  • Loading branch information
strugee committed Nov 7, 2024
1 parent ed40207 commit 3d9ffe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bin/seagl-setup-app
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion etc/firefox/policies/policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Bookmarks": [
{
"Title": "Attend Portal",
"URL": "https://attend.seagl.org/",
"URL": "https://attend.seagl.org/?__ATTEND_PORTAL_CREDENTIALS__=t",
"Placement": "toolbar"
},
{
Expand Down

0 comments on commit 3d9ffe7

Please sign in to comment.