update readme + add option to customize api endpoint
All checks were successful
Build docker container / build (push) Successful in 4m43s

This commit is contained in:
David Claeys
2024-11-26 12:27:04 +01:00
parent e7b49898df
commit 6543f2ce6c
3 changed files with 16 additions and 8 deletions

View File

@ -8,6 +8,7 @@ for arg in "$@"; do
days=*) days="${arg#*=}" ;;
max_connections=*) max_connections="${arg#*=}" ;;
enable_fixes=*) enable_fixes="${arg#*=}" ;;
api_url=*) api_url="${arg#*=}" ;;
esac
done
@ -17,11 +18,14 @@ echo "working dir : " $(pwd)
echo "days : ${days}"
echo "max_connections : ${max_connections}"
echo "enable_fixes : ${enable_fixes}"
echo "api url : ${api_url}"
if [ "$enable_fixes" = true ] ; then
cp -R /fixes/* /bin/epg/sites/
fi
sed -i -E "s/(https:\x2f\x2fiptv-org.github.io\x2fapi)/$api_url/g" $work_dir/scripts/core/apiClient.ts
pm2 --name epg start npm -- run serve
npm run grab -- --channels=channels.xml --maxConnections=$max_connections --days=$days --gzip
ln -s $work_dir/guide.xml /public/guide.xml