Skip to content

fix: resolve setup script configuration issues (#59)#86

Open
muhizipen wants to merge 1 commit intobos-com:mainfrom
muhizipen:fix/setup-script-issues
Open

fix: resolve setup script configuration issues (#59)#86
muhizipen wants to merge 1 commit intobos-com:mainfrom
muhizipen:fix/setup-script-issues

Conversation

@muhizipen
Copy link
Copy Markdown

Description

This PR fixes two issues in the GreenCode setup script.

Issue 1: .env file not created

  • Problem: setup.sh had no logic to create .env from env.example
  • Fix: Added create_env_file() function that:
    • Checks for env.example or .env.example
    • Creates .env file automatically
    • Shows success/error messages

Issue 2: Missing start/stop/restart scripts

  • Problem: setup.sh referenced scripts that didn't exist
  • Fix: Created three new scripts:
Script Purpose
scripts/start.sh Launches Spring Boot application
scripts/stop.sh Gracefully shuts down the application
scripts/restart.sh Restarts the application

Files Changed

File Change Type Lines
scripts/setup.sh Modified +40
scripts/start.sh New file +35
scripts/stop.sh New file -
scripts/restart.sh New file +11

Testing Performed

  • ./scripts/setup.sh creates .env from env.example
  • All scripts are executable
  • Error handling works when .env missing

Related Issue

Closes #59

Checklist

  • My code follows the project's style
  • I have tested my changes
  • All scripts are executable (chmod +x)
  • PR references the issue number

- Added create_env_file function to handle .env creation from env.example
- Created start.sh script to launch the application
- Created stop.sh script to gracefully shutdown
- Created restart.sh script for quick restarts
- Updated main() to call create_env_file

Closes bos-com#59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CONTRIBUTING.md to guide new contributors.

1 participant