fix(config): unify config path detection across all scripts
- Add platform detection to start.sh for consistent config paths - BSD systems: /usr/local/etc/furt/furt.conf - Linux systems: /etc/furt/furt.conf - Now consistent with setup-directories.sh and validate-config.sh - Follows DAW service separation standards Fixes #103
This commit is contained in:
parent
b068a24ed5
commit
c15b01a0a6
1 changed files with 8 additions and 2 deletions
|
|
@ -17,9 +17,15 @@ echo -e "${GREEN}=== Furt Lua HTTP-Server Startup ===${NC}"
|
|||
LUA_COMMAND=""
|
||||
|
||||
# Config check first (like old .env check)
|
||||
if [ ! -f "/usr/local/etc/furt/furt.conf" ] && [ ! -f "$PROJECT_DIR/config/furt.conf" ]; then
|
||||
if [ "$(uname)" = "OpenBSD" ] || [ "$(uname)" = "FreeBSD" ]; then
|
||||
CONFIG_FILE="/usr/local/etc/furt/furt.conf"
|
||||
else
|
||||
CONFIG_FILE="/etc/furt/furt.conf"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG_FILE" ] && [ ! -f "$PROJECT_DIR/config/furt.conf" ]; then
|
||||
echo -e "${RED}Error: furt.conf not found${NC}"
|
||||
echo "Create config first in /usr/local/etc/furt/furt.conf or $PROJECT_DIR/config/furt.conf"
|
||||
echo "Create config first in $CONFIG_FILE or $PROJECT_DIR/config/furt.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue