We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit 65ce41aCopy full SHA for 65ce41a
README.md
@@ -0,0 +1,5 @@
1
+# Docker-SRS
2
+
3
+Docker for [SRS](https://github.com/ossrs/srs).
4
5
+Winlin, 2021.03
auto/get_host_ip.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Get host ip4 of interface eth0/en0/eth1.
+# For linux, eth0 inet.
6
+ifconfig eth0 >/dev/null 2>/dev/null && ip -4 addr show scope global dev eth0| grep inet| awk '{print $2}' && exit 0
7
8
+# For linux, eth1 inet.
9
+ifconfig eth1 >/dev/null 2>/dev/null && ip -4 addr show scope global dev eth1| grep inet| awk '{print $2}' && exit 0
10
11
+# For macOS, en0 inet.
12
+ifconfig en0 inet >/dev/null 2>/dev/null && ifconfig en0 inet| grep inet| awk '{print $2}' && exit 0
13
14
+echo "No IP found"
15
+exit 1
0 commit comments