fix(service): add service vs interactive detection to start.sh
- Fix hanging rcctl/systemd service starts - Background mode (&) when no TTY (service context) - Foreground mode (exec) for interactive usage - POSIX-compatible detection via [ ! -t 0 ] Fixes service timeout issues on OpenBSD rcctl and Linux systemd. Tested on werner - service starts correctly and survives reboots. Fixes DAW/furt#99
This commit is contained in:
parent
0d39d166b8
commit
11ceb187b6
1 changed files with 12 additions and 2 deletions
|
|
@ -61,6 +61,16 @@ $LUA_COMMAND -e "require('cjson')" 2>/dev/null || {
|
||||||
cd "$PROJECT_DIR"
|
cd "$PROJECT_DIR"
|
||||||
|
|
||||||
echo -e "${GREEN}Starting Furt...${NC}"
|
echo -e "${GREEN}Starting Furt...${NC}"
|
||||||
# Furt liest selbst seine Config aus furt.conf
|
|
||||||
exec "$LUA_COMMAND" src/main.lua
|
# Service vs Interactive Detection
|
||||||
|
if [ ! -t 0 ] || [ ! -t 1 ]; then
|
||||||
|
# Service mode - Background
|
||||||
|
"$LUA_COMMAND" src/main.lua &
|
||||||
|
else
|
||||||
|
# Interactive mode - Foreground
|
||||||
|
exec "$LUA_COMMAND" src/main.lua
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Furt liest selbst seine Config aus furt.conf
|
||||||
|
#exec "$LUA_COMMAND" src/main.lua
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue