y59 commited on
Commit
a6f7af2
·
verified ·
1 Parent(s): bfe9c22

Update startup.sh

Browse files
Files changed (1) hide show
  1. startup.sh +26 -5
startup.sh CHANGED
@@ -14,6 +14,18 @@ echo "NPM version: $(npm -v)"
14
  echo "User: $(whoami)"
15
  echo "Current working directory: $(pwd)"
16
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  # Set environment variables
18
  export HOME=/tmp
19
  export STREMIO_USER_DATA_DIR=/tmp/.stremio-server
@@ -29,11 +41,20 @@ echo "Proxy started with PID: $PROXY_PID"
29
  # Slight delay before starting Stremio
30
  sleep 2
31
 
32
- # Start Stremio server
33
- echo "Starting Stremio server on port 11470..."
34
- /app/stremio-web-service-run.sh &
35
- STREMIO_PID=$!
36
- echo "Stremio server started with PID: $STREMIO_PID"
 
 
 
 
 
 
 
 
 
37
 
38
  # Keep container running
39
  echo "Services started, monitoring processes..."
 
14
  echo "User: $(whoami)"
15
  echo "Current working directory: $(pwd)"
16
 
17
+ # Find stremio-web-service-run.sh
18
+ STREMIO_SCRIPT=$(find / -name stremio-web-service-run.sh 2>/dev/null | head -1)
19
+ if [ -z "$STREMIO_SCRIPT" ]; then
20
+ echo "ERROR: Could not find stremio-web-service-run.sh"
21
+ echo "Listing potential directories:"
22
+ find / -type d -name "stremio*" 2>/dev/null
23
+ ls -la /
24
+ echo "Proceeding with proxy only"
25
+ else
26
+ echo "Found Stremio script at: $STREMIO_SCRIPT"
27
+ fi
28
+
29
  # Set environment variables
30
  export HOME=/tmp
31
  export STREMIO_USER_DATA_DIR=/tmp/.stremio-server
 
41
  # Slight delay before starting Stremio
42
  sleep 2
43
 
44
+ # Start Stremio server if script was found
45
+ if [ -n "$STREMIO_SCRIPT" ]; then
46
+ echo "Starting Stremio server on port 11470..."
47
+ chmod +x "$STREMIO_SCRIPT"
48
+ "$STREMIO_SCRIPT" &
49
+ STREMIO_PID=$!
50
+ echo "Stremio server started with PID: $STREMIO_PID"
51
+ else
52
+ echo "WARNING: Skipping Stremio server start due to missing script"
53
+ # Try running stremio server directly as fallback
54
+ echo "Attempting to start server directly..."
55
+ cd /
56
+ node server.js &
57
+ fi
58
 
59
  # Keep container running
60
  echo "Services started, monitoring processes..."