Skip to content

Commit

Permalink
Add fix for incompatible df ouput and curl retry in stremio-web-servi…
Browse files Browse the repository at this point in the history
…ce-run.sh (#43)
  • Loading branch information
m4n0v31 authored Sep 17, 2024
1 parent c9f5af8 commit 7ac8805
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stremio-web-service-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ fi
grep -q 'self.proxyStreamsEnabled = false,' server.js || sed -i '/self.allTranscodeProfiles = \[\]/a \ \ \ \ \ \ \ \ self.proxyStreamsEnabled = false,' server.js

# fix for incomptible df
alias df="df -P"
grep -q 'df -Pk' server.js || sed -i 's/df -k/df -Pk/g' server.js

node server.js &
sleep 1

if [ ! -z "$IPADDRESS" ]; then
curl "http://localhost:11470/get-https??authKey=&ipAddress=$IPADDRESS"
curl --connect-timeout 5 \
--retry-all-errors \
--retry 5 \
"http://localhost:11470/get-https??authKey=&ipAddress=$IPADDRESS"
CERT=$(node extract_certificate.js "$CONFIG_FOLDER")
echo "$IPADDRESS" "$CERT" >> /etc/hosts
http-server build/ -p 8080 -d false -S -K "$CONFIG_FOLDER""$CERT".pem -C "$CONFIG_FOLDER""$CERT".pem
Expand Down

0 comments on commit 7ac8805

Please sign in to comment.