Added a check to the start scripts to ensure they are being run from the correct directory. Informs user if they're being run from /scripts/ directly and provides a descriptive error message.
Fixes #218
Description
If the start script(s) are run from the incorrect directory this currently throws a confusing error message.
This fix checks the directory the script is being run from and will alert the user if they're running it from the wrong directory.
Related Issue
218
Motivation and Context
I encountered this problem myself when testing Nostream, and found an issue had already been raised, so I assume others will be making the same mistake and assuming it's "safe" to run ./start from within the scripts folder. Adding a simple message to the script will save people time troubleshooting postgres errors.
How Has This Been Tested?
Tested on Ubuntu Server 22.04
Screenshots (if appropriate):
Types of changes
[ ] Non-functional change (docs, style, minor refactor)
[ x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Added a check to the start scripts to ensure they are being run from the correct directory. Informs user if they're being run from /scripts/ directly and provides a descriptive error message. Fixes #218
Description
If the start script(s) are run from the incorrect directory this currently throws a confusing error message. This fix checks the directory the script is being run from and will alert the user if they're running it from the wrong directory.
Related Issue
218
Motivation and Context
I encountered this problem myself when testing Nostream, and found an issue had already been raised, so I assume others will be making the same mistake and assuming it's "safe" to run ./start from within the scripts folder. Adding a simple message to the script will save people time troubleshooting postgres errors.
How Has This Been Tested?
Tested on Ubuntu Server 22.04
Screenshots (if appropriate):
Types of changes
Checklist: