You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			417 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			17 lines
		
	
	
		
			417 B
		
	
	
	
		
			Bash
		
	
| #!/usr/bin/env sh
 | |
| 
 | |
| # Automatically authenticate the user if they are not
 | |
| # logged in to another deployment
 | |
| 
 | |
| echo "Logging into Coder..."
 | |
| 
 | |
| echo "SESSION TOKEN : ${CODER_USER_TOKEN}"
 | |
| echo "DEPLOYMENT URL: ${CODER_DEPLOYMENT_URL}"
 | |
| echo ""
 | |
| 
 | |
| if ! coder list >/dev/null 2>&1; then
 | |
|   set +x; coder login --token="${CODER_USER_TOKEN}" --url="${CODER_DEPLOYMENT_URL}"
 | |
| else
 | |
|   echo "You are already authenticated with coder"
 | |
| fi
 |