kalhdrawi commited on
Commit
1ac429f
Β·
verified Β·
1 Parent(s): 949ab69

Upload 8 files

Browse files
Files changed (1) hide show
  1. start.sh +8 -6
start.sh CHANGED
@@ -6,13 +6,15 @@ set -e
6
  # We just launch the listener. unoserver can manage this, but running soffice directly is often simpler for diagnostics.
7
  # Actually, unoserver command starts the listener.
8
  echo "πŸš€ Starting LibreOffice Listener..."
9
- # Start soffice in background listening on port 2002
10
- soffice --accept="socket,host=127.0.0.1,port=2002;urp;" --headless --invisible --nologo --nodefault --norestore &
 
 
11
 
12
- # Wait for port 2002 to be ready
13
- echo "⏳ Waiting for LibreOffice to be ready..."
14
- timeout 15 bash -c 'until echo > /dev/tcp/127.0.0.1/2002 2>/dev/null; do sleep 0.5; done'
15
- echo "βœ… LibreOffice is ready!"
16
 
17
  # Start FastAPI
18
  echo "πŸš€ Starting FastAPI..."
 
6
  # We just launch the listener. unoserver can manage this, but running soffice directly is often simpler for diagnostics.
7
  # Actually, unoserver command starts the listener.
8
  echo "πŸš€ Starting LibreOffice Listener..."
9
+ # Start Unoserver (which manages LibreOffice)
10
+ # Unoserver listens on 2003 (XML-RPC) and talks to LO on 2002
11
+ echo "πŸš€ Starting Unoserver..."
12
+ unoserver --interface 127.0.0.1 --port 2003 --uno-interface 127.0.0.1 --uno-port 2002 &
13
 
14
+ # Wait for Unoserver RPC port 2003 to be ready
15
+ echo "⏳ Waiting for Unoserver to be ready..."
16
+ timeout 20 bash -c 'until echo > /dev/tcp/127.0.0.1/2003 2>/dev/null; do sleep 0.5; done'
17
+ echo "βœ… Unoserver is ready!"
18
 
19
  # Start FastAPI
20
  echo "πŸš€ Starting FastAPI..."