Update boop-keys/setup-boop.sh

This commit is contained in:
Kakious 2023-07-21 08:57:36 -07:00
parent 6ad509de3f
commit 1607f07fad

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
echo "Running initial setup for BOOP..." echo "[BOOTSTRAP] Running initial setup for BOOP..."
mysql -u root -e "CREATE DATABASE IF NOT EXISTS oauth_provider;" mysql -u root -e "CREATE DATABASE IF NOT EXISTS oauth_provider;"
password=$(openssl rand -base64 32) password=$(openssl rand -base64 32)
@ -11,7 +11,7 @@ mysql -u root -p$password -e "GRANT ALL PRIVILEGES ON oauth_provider.* TO 'oauth
mysql -u root -p$password -e "FLUSH PRIVILEGES;" mysql -u root -p$password -e "FLUSH PRIVILEGES;"
chown coder:coder /home/coder/oauth-provider/.dbpass chown coder:coder /home/coder/oauth-provider/.dbpass
echo "DB Configured, setting up .env file..." echo "[BOOTSTRAP] DB Configured, setting up .env file..."
# read /home/coder/.coder-env as they contain the workspace name and username # read /home/coder/.coder-env as they contain the workspace name and username
@ -27,4 +27,4 @@ sed -i "s/REDIS_HOST=/REDIS_HOST=localhost/g" /home/coder/oauth-provider/.env
sed -i "s/REDIS_PORT=/REDIS_PORT=6379/g" /home/coder/oauth-provider/.env sed -i "s/REDIS_PORT=/REDIS_PORT=6379/g" /home/coder/oauth-provider/.env
sed -i "s/BASE_LOCAL_URL=/BASE_LOCAL_URL=https:\/\/3123--$WORKSPACE_ENV--$USERNAME_ENV.coder.kakio.us/g" /home/coder/oauth-provider/.env sed -i "s/BASE_LOCAL_URL=/BASE_LOCAL_URL=https:\/\/3123--$WORKSPACE_ENV--$USERNAME_ENV.coder.kakio.us/g" /home/coder/oauth-provider/.env
echo "Done!" echo "[BOOTSTRAP] Script has finished running."