mirror of
https://github.com/unraid/api.git
synced 2026-01-05 16:09:49 -06:00
fix: rm short-circuit in rc.unraid-api if plugin config dir is absent (#1515)
This short-circuit causes any/all `rc.unraid-api` invocations to immediately fail on fresh 7.2 images (because `/boot/config/dynamix.my.servers` doesn't exist). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Removed initial checks and setup for a plugin directory and default environment file in the startup script. * Simplified environment switching with streamlined commands and improved error handling. * Removed deprecated environment path references and updated related tests. * **Documentation** * Added descriptive comments clarifying build and environment settings. * **Tests** * Updated test cases by removing assertions related to deprecated environment paths. * **Maintenance** * Updated timestamp fixtures for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -4,9 +4,6 @@
|
||||
# shellcheck source=/dev/null
|
||||
source /etc/profile
|
||||
|
||||
flash="/boot/config/plugins/dynamix.my.servers"
|
||||
[[ ! -d "${flash}" ]] && echo "Please reinstall the Unraid Connect plugin" && exit 1
|
||||
[[ ! -f "${flash}/env" ]] && echo 'env=production' >"${flash}/env"
|
||||
unraid_binary_path="/usr/local/bin/unraid-api"
|
||||
api_base_dir="/usr/local/unraid-api"
|
||||
scripts_dir="/usr/local/share/dynamix.unraid.net/scripts"
|
||||
|
||||
Reference in New Issue
Block a user