y59 commited on
Commit
828ee24
·
verified ·
1 Parent(s): f6252fb

Update startup.sh

Browse files
Files changed (1) hide show
  1. startup.sh +13 -4
startup.sh CHANGED
@@ -7,13 +7,22 @@ echo "Checking environment..."
7
  echo "Node version: $(node -v)"
8
  echo "NPM version: $(npm -v)"
9
 
10
- # Create .stremio-server directory if it doesn't exist
11
- mkdir -p /root/.stremio-server
12
- echo "Initialized Stremio directories"
 
 
 
 
 
 
 
 
13
 
14
  # Start Stremio server in background with increased logging
15
  echo "Starting Stremio server on port 11470..."
16
  export STREMIO_LOGGING=1
 
17
  /app/stremio-web-service-run.sh &
18
  STREMIO_PID=$!
19
  echo "Stremio server started with PID: $STREMIO_PID"
@@ -45,4 +54,4 @@ ps aux | grep -v grep | grep -E 'node|stremio'
45
 
46
  # Start proxy in foreground
47
  echo "Starting proxy to forward port 7860 to 11470..."
48
- exec node /app/proxy.js
 
7
  echo "Node version: $(node -v)"
8
  echo "NPM version: $(npm -v)"
9
 
10
+ # Set up stremio data directory in /tmp which should be writable
11
+ export STREMIO_USER_DATA_DIR="/tmp/.stremio-server"
12
+ export HOME="/tmp"
13
+ mkdir -p $STREMIO_USER_DATA_DIR
14
+ echo "Initialized Stremio directories in $STREMIO_USER_DATA_DIR"
15
+
16
+ # Print current directories for debugging
17
+ echo "Directory permissions:"
18
+ ls -la /tmp
19
+ echo "Current user: $(whoami)"
20
+ echo "Current user ID: $(id)"
21
 
22
  # Start Stremio server in background with increased logging
23
  echo "Starting Stremio server on port 11470..."
24
  export STREMIO_LOGGING=1
25
+ export NO_CORS=1
26
  /app/stremio-web-service-run.sh &
27
  STREMIO_PID=$!
28
  echo "Stremio server started with PID: $STREMIO_PID"
 
54
 
55
  # Start proxy in foreground
56
  echo "Starting proxy to forward port 7860 to 11470..."
57
+ exec node /app/proxy.js