Skip to content

Commit

Permalink
fix: Mac - Set ReleaseChannel In JumpCloud Password Manager.md loops …
Browse files Browse the repository at this point in the history
…over users
  • Loading branch information
gbitarjc committed Jul 4, 2024
1 parent dbba080 commit 4be1aaf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,24 @@ mac
```
#!/bin/bash
# Set $RELEASE_CHANNEL to beta OR dogfood OR public ON LINE 4 depending on your desired release channel
# Set $RELEASE_CHANNEL to beta OR dogfood OR public ON LINE 15 depending on your desired release channel
RELEASE_CHANNEL="public"
#------- Do not modify below this line ------
FILE_PATH="$HOME/Library/Application Support/JumpCloud Password Manager/data/daemon/releaseChannel.txt"
mkdir -p "$(dirname "$FILE_PATH")"
echo -n "$RELEASE_CHANNEL" > "$FILE_PATH"
for user in $(dscl . list /Users | grep -vE 'root|daemon|nobody|^_'); do
if [[ -d /Users/$user ]]; then
BASE_PATH="/Users/$user/Library/Application Support/JumpCloud Password Manager"
FILE_PATH="$BASE_PATH/data/daemon/releaseChannel.txt"
mkdir -p "$(dirname "$FILE_PATH")"
echo -n "$RELEASE_CHANNEL" >"$FILE_PATH"
sudo chown -R $user "$BASE_PATH"
fi
done
```

#### Description
Expand Down
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Commands Gallery/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
{
"name": "Mac - Set JumpCloud Password Manager Release Channel | v1.0 JCCG",
"type": "mac",
"command": "#!/bin/bash\n\n# Set $RELEASE_CHANNEL to beta OR dogfood OR public ON LINE 4 depending on your desired release channel\nRELEASE_CHANNEL=\"public\"\n\n#------- Do not modify below this line ------\n\nFILE_PATH=\"$HOME/Library/Application Support/JumpCloud Password Manager/data/daemon/releaseChannel.txt\"\nmkdir -p \"$(dirname \"$FILE_PATH\")\"\necho -n \"$RELEASE_CHANNEL\" > \"$FILE_PATH\"",
"command": "#!/bin/bash\n\n# Set $RELEASE_CHANNEL to beta OR dogfood OR public ON LINE 15 depending on your desired release channel\nRELEASE_CHANNEL=\"public\"\n\n#------- Do not modify below this line ------\n\nfor user in $(dscl . list /Users | grep -vE 'root|daemon|nobody|^_'); do\n if [[ -d /Users/$user ]]; then\n BASE_PATH=\"/Users/$user/Library/Application Support/JumpCloud Password Manager\"\n\n FILE_PATH=\"$BASE_PATH/data/daemon/releaseChannel.txt\"\n\n mkdir -p \"$(dirname \"$FILE_PATH\")\"\n\n echo -n \"$RELEASE_CHANNEL\" >\"$FILE_PATH\"\n\n sudo chown -R $user \"$BASE_PATH\"\n fi\ndone",
"link": "https://github.com/TheJumpCloud/support/blob/master/PowerShell/JumpCloud%20Commands%20Gallery/Mac%20Commands/Mac%20-%20Set%20ReleaseChannel%20In%20JumpCloud%20Password%20Manager.md",
"description": "This command will set the desired release channel for JumpCloud's Password Manager in application's directory. The relesase channel options are beta, dogfood and public."
},
Expand Down

0 comments on commit 4be1aaf

Please sign in to comment.