privateone commited on
Commit
c923cfb
·
verified ·
1 Parent(s): 4852c89

Update custom-entrypoint.sh

Browse files
Files changed (1) hide show
  1. custom-entrypoint.sh +42 -25
custom-entrypoint.sh CHANGED
@@ -1,32 +1,49 @@
1
  #!/bin/bash
2
-
3
  set -e
4
 
5
- # Detect external/public IP dynamically (you can hardcode this if needed)
6
- # EXTERNAL_IP=$(curl -s https://ifconfig.me)
7
-
8
- # exec turnserver \
9
- # --listening-ip=0.0.0.0 \
10
- # --listening-port=7860 \
11
- # --tls-listening-port=7860 \
12
- # --cert=/etc/turn/certs/turn_server_cert.pem \
13
- # --pkey=/etc/turn/certs/turn_server_pkey.pem \
14
- # --user=myuser:mypassword \
15
- # --realm=privateone-coturn.hf.space \
16
- # --log-file=stdout \
17
- # --simple-log \
18
- # --no-cli
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- turnserver -c /etc/coturn/turnserver.conf --no-cli
21
 
22
 
23
- # ngrok config add-authtoken "$NGROK_AUTHTOKEN"
24
- # ngrok authtoken "$NGROK_AUTHTOKEN"
25
- # ngrok tls 7860 -url heather-tressy-paxton.ngrok-free.app
26
- # ngrok tcp 7860 --log=stdout &
27
 
28
- # ngrok start cli-quickstart
29
- # ngrok config check --config ngrok2/ngrok.yml
30
- # ngrok start turn_tls --config=ngrok2/ngrok.yml
31
- cat /ngrok2/ngrok.yml
32
- # ngrok start turn_tls --config /ngrok2/ngrok.yml --log=stdout --log-level=debug
 
1
  #!/bin/bash
 
2
  set -e
3
 
4
+ # Optional: Print ngrok config
5
+ cat /ngrok2/ngrok.yml
6
+
7
+ # Start turnserver in background
8
+ turnserver -c /etc/coturn/turnserver.conf --no-cli &
9
+ TURN_PID=$!
10
+
11
+ # Trap termination signals to cleanly stop turnserver
12
+ trap "echo 'Stopping turnserver'; kill $TURN_PID; wait $TURN_PID; exit" SIGINT SIGTERM
13
+
14
+ # Exec the CMD (ngrok command) passed as args to this script
15
+ exec "$@"
16
+
17
+
18
+ # #!/bin/bash
19
+
20
+ # set -e
21
+
22
+ # # Detect external/public IP dynamically (you can hardcode this if needed)
23
+ # # EXTERNAL_IP=$(curl -s https://ifconfig.me)
24
+
25
+ # # exec turnserver \
26
+ # # --listening-ip=0.0.0.0 \
27
+ # # --listening-port=7860 \
28
+ # # --tls-listening-port=7860 \
29
+ # # --cert=/etc/turn/certs/turn_server_cert.pem \
30
+ # # --pkey=/etc/turn/certs/turn_server_pkey.pem \
31
+ # # --user=myuser:mypassword \
32
+ # # --realm=privateone-coturn.hf.space \
33
+ # # --log-file=stdout \
34
+ # # --simple-log \
35
+ # # --no-cli
36
 
37
+ # turnserver -c /etc/coturn/turnserver.conf --no-cli
38
 
39
 
40
+ # # ngrok config add-authtoken "$NGROK_AUTHTOKEN"
41
+ # # ngrok authtoken "$NGROK_AUTHTOKEN"
42
+ # # ngrok tls 7860 -url heather-tressy-paxton.ngrok-free.app
43
+ # # ngrok tcp 7860 --log=stdout &
44
 
45
+ # # ngrok start cli-quickstart
46
+ # # ngrok config check --config ngrok2/ngrok.yml
47
+ # # ngrok start turn_tls --config=ngrok2/ngrok.yml
48
+ # cat /ngrok2/ngrok.yml
49
+ # # ngrok start turn_tls --config /ngrok2/ngrok.yml --log=stdout --log-level=debug