Compare commits

..

No commits in common. "1162dceef8b32cc1082ea425901325b672400208" and "bf417266136ad4cc8b73577988b7ae5c25d96e85" have entirely different histories.

2 changed files with 10 additions and 25 deletions

View file

@ -18,4 +18,3 @@
25a29c32,442b465,fix/systemd-type-forking,2025-09-05T15:02:31Z,michael,git,lua-api 25a29c32,442b465,fix/systemd-type-forking,2025-09-05T15:02:31Z,michael,git,lua-api
25a29c32,c15b01a,fix/config-path-consistency,2025-09-05T15:21:25Z,michael,git,lua-api 25a29c32,c15b01a,fix/config-path-consistency,2025-09-05T15:21:25Z,michael,git,lua-api
795f8867,78e8ded,fix/json-library-compatibility,2025-09-05T15:44:42Z,michael,git,lua-api 795f8867,78e8ded,fix/json-library-compatibility,2025-09-05T15:44:42Z,michael,git,lua-api
795f8867,d4fa6e3,fix/ssl-dependency-check,2025-09-05T16:20:08Z,michael,git,lua-api

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# scripts/start.sh # furt-lua/scripts/start.sh - Bereinigt ohne obsoletes Environment-System
set -e set -e
# Colors # Colors
@ -16,7 +16,7 @@ echo -e "${GREEN}=== Furt Lua HTTP-Server Startup ===${NC}"
# User can override this manually if needed: # User can override this manually if needed:
LUA_COMMAND="" LUA_COMMAND=""
# Config check first # Config check first (like old .env check)
if [ "$(uname)" = "OpenBSD" ] || [ "$(uname)" = "FreeBSD" ]; then if [ "$(uname)" = "OpenBSD" ] || [ "$(uname)" = "FreeBSD" ]; then
CONFIG_FILE="/usr/local/etc/furt/furt.conf" CONFIG_FILE="/usr/local/etc/furt/furt.conf"
else else
@ -45,6 +45,7 @@ if [ -z "$LUA_COMMAND" ]; then
echo " Arch: pacman -S lua51" echo " Arch: pacman -S lua51"
echo " OpenBSD: pkg_add lua51" echo " OpenBSD: pkg_add lua51"
echo " Debian: apt install lua5.1" echo " Debian: apt install lua5.1"
echo " FreeBSD: pkg install lua51"
echo "" echo ""
echo "Or set: LUA_COMMAND=/custom/path/lua51 at top of this script" echo "Or set: LUA_COMMAND=/custom/path/lua51 at top of this script"
exit 1 exit 1
@ -52,37 +53,19 @@ fi
echo -e "${GREEN}Found Lua:${NC} $LUA_COMMAND" echo -e "${GREEN}Found Lua:${NC} $LUA_COMMAND"
# Dependency checks # Dependency checks (lua-socket, lua-cjson)
# Socket check
$LUA_COMMAND -e "require('socket')" 2>/dev/null || { $LUA_COMMAND -e "require('socket')" 2>/dev/null || {
echo -e "${RED}Error: lua-socket not found${NC}" echo -e "${RED}Error: lua-socket not found${NC}"
echo "Install options:"
echo " Arch: pacman -S lua51-socket"
echo " OpenBSD: pkg_add lua-socket"
echo " Debian: apt install lua-socket"
exit 1 exit 1
} }
# JSON library check # JSON library check (cjson preferred, dkjson fallback)
if ! ($LUA_COMMAND -e "require('cjson')" 2>/dev/null || $LUA_COMMAND -e "require('dkjson')" 2>/dev/null); then if ! ($LUA_COMMAND -e "require('cjson')" 2>/dev/null || $LUA_COMMAND -e "require('dkjson')" 2>/dev/null); then
echo -e "${RED}Error: No JSON library found${NC}" echo -e "${RED}Error: No JSON library found${NC}"
echo "Install options:" echo "Install lua-cjson or lua-dkjson"
echo " Arch: pacman -S lua51-dkjson"
echo " OpenBSD: pkg_add lua-cjson"
echo " Debian: apt install lua-cjson"
exit 1 exit 1
fi fi
# SSL/TLS library check
$LUA_COMMAND -e "require('ssl')" 2>/dev/null || {
echo -e "${RED}Error: SSL/TLS library not found${NC}"
echo "Install options:"
echo " Arch: pacman -S lua51-sec"
echo " OpenBSD: pkg_add luasec"
echo " Debian: apt install lua-sec"
exit 1
}
cd "$PROJECT_DIR" cd "$PROJECT_DIR"
echo -e "${GREEN}Starting Furt...${NC}" echo -e "${GREEN}Starting Furt...${NC}"
@ -96,3 +79,6 @@ else
exec "$LUA_COMMAND" src/main.lua exec "$LUA_COMMAND" src/main.lua
fi fi
# Furt liest selbst seine Config aus furt.conf
#exec "$LUA_COMMAND" src/main.lua