Fix start.sh script lua51 detection failure #91

Closed
opened 2025-08-15 17:04:40 +02:00 by michael · 1 comment
Owner

Problem

start.sh script fails to detect installed lua51:

./scripts/start.sh
Error: lua51 is not installed
Install with: pkg_add lua51 (OpenBSD) or apt install lua5.1 (Ubuntu)

But lua51 is actually installed and working:

lua51 src/main.lua  # works fine

Root Cause

Detection logic in start.sh incorrectly checks for lua51 availability.

Requirements

  • Fix lua51 detection - proper check for lua51 binary
  • Test on current environment - verify detection works on karl
  • Environment compatibility - ensure works on OpenBSD + Arch Linux
  • Fallback logic - try lua51, lua5.1, lua in order
  • Clear error messages - specific guidance for different systems

Expected Behavior

./scripts/start.sh
=== Furt Lua HTTP-Server Startup ===
Checking dependencies...
Found Lua: lua51
Loading environment variables...
Furt HTTP-Server started on 127.0.0.1:8080

Current Workaround

Direct start: lua51 src/main.lua

Files to check

  • scripts/start.sh
  • Environment detection logic
  • Lua binary discovery

Priority

Small effort - improves developer experience for local testing.

## Problem start.sh script fails to detect installed lua51: ``` ./scripts/start.sh Error: lua51 is not installed Install with: pkg_add lua51 (OpenBSD) or apt install lua5.1 (Ubuntu) ``` But lua51 is actually installed and working: ``` lua51 src/main.lua # works fine ``` ## Root Cause Detection logic in start.sh incorrectly checks for lua51 availability. ## Requirements - [ ] **Fix lua51 detection** - proper check for lua51 binary - [ ] **Test on current environment** - verify detection works on karl - [ ] **Environment compatibility** - ensure works on OpenBSD + Arch Linux - [ ] **Fallback logic** - try lua51, lua5.1, lua in order - [ ] **Clear error messages** - specific guidance for different systems ## Expected Behavior ``` ./scripts/start.sh === Furt Lua HTTP-Server Startup === Checking dependencies... Found Lua: lua51 Loading environment variables... Furt HTTP-Server started on 127.0.0.1:8080 ``` ## Current Workaround Direct start: `lua51 src/main.lua` ## Files to check - scripts/start.sh - Environment detection logic - Lua binary discovery ## Priority Small effort - improves developer experience for local testing.
michael added the
effort
small
priority
medium
status
to-go
type
bug
labels 2025-08-15 17:04:40 +02:00
Author
Owner

Issue Resolved

Root Cause: Variable name inconsistency in start.sh script

  • Auto-detection set: LUA_COMMAND=lua51
  • Script used: $LUA_CMD (empty variable)

Solution: Fixed variable naming throughout script + removed obsolete environment system

Changes Made

  1. Fixed lua51 detection - corrected LUA_CMD -> LUA_COMMAND inconsistency
  2. Removed obsolete .env loading - furt now reads furt.conf directly (single config system)
  3. Added config validation - checks for furt.conf before starting
  4. Enhanced distribution support - Arch, OpenBSD, Debian, FreeBSD install instructions
  5. Improved fallback logic - tries lua51 -> lua5.1 (Lua 5.1 only, no generic lua)

Verification

./scripts/start.sh
=== Furt Lua HTTP-Server Startup ===
Found Lua: lua51
Loading config from: config/furt.conf
Furt HTTP-Server started on 127.0.0.1:7811 ✅

Status: start.sh now works correctly on development systems
Bonus: Eliminated dual config system complexity (environment + furt.conf)

## ✅ Issue Resolved **Root Cause:** Variable name inconsistency in start.sh script - Auto-detection set: `LUA_COMMAND=lua51` ✅ - Script used: `$LUA_CMD` ❌ (empty variable) **Solution:** Fixed variable naming throughout script + removed obsolete environment system ## Changes Made 1. **Fixed lua51 detection** - corrected LUA_CMD -> LUA_COMMAND inconsistency 2. **Removed obsolete .env loading** - furt now reads furt.conf directly (single config system) 3. **Added config validation** - checks for furt.conf before starting 4. **Enhanced distribution support** - Arch, OpenBSD, Debian, FreeBSD install instructions 5. **Improved fallback logic** - tries lua51 -> lua5.1 (Lua 5.1 only, no generic lua) ## Verification ```bash ./scripts/start.sh === Furt Lua HTTP-Server Startup === Found Lua: lua51 Loading config from: config/furt.conf Furt HTTP-Server started on 127.0.0.1:7811 ✅ ``` **Status: start.sh now works correctly on development systems** **Bonus: Eliminated dual config system complexity (environment + furt.conf)**
michael added
status
done
and removed
status
to-go
labels 2025-08-29 22:06:15 +02:00
michael added this to the v0.1.2 - Gateway Basics milestone 2025-08-30 18:45:04 +02:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DAW/furt#91
No description provided.