Skip to content

Commit 94a4e72

Browse files
committed
fix: use node http instead of curl for data-send (curl not in alpine image)
1 parent 86aec5d commit 94a4e72

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎build/splitpro/entrypoint.sh‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ elif [ -z "$NEXTAUTH_URL" ]; then
2626
fi
2727

2828
# Publish the public URL to the DAppNode info tab
29-
curl -sf -X POST \
30-
"http://my.dappnode/data-send?key=Publicly+reachable+UI+(share+with+friends)&data=${NEXTAUTH_URL}" \
31-
>/dev/null 2>&1 || true
29+
node -e "
30+
const http = require('http');
31+
const u = new URL('http://my.dappnode/data-send');
32+
u.searchParams.set('key', 'Publicly reachable UI (share with friends)');
33+
u.searchParams.set('data', process.env.NEXTAUTH_URL || '');
34+
const req = http.request(u, {method:'POST'}, r => r.resume());
35+
req.on('error', e => console.error('data-send failed:', e.message));
36+
req.end();
37+
" 2>&1 || true
3238

3339
# Construct and EXPORT DATABASE_URL (upstream start.sh sets it but doesn't export it)
3440
if [ -z "$DATABASE_URL" ]; then

0 commit comments

Comments
 (0)