Skip to content

Commit 65ce41a

Browse files
committed
add README
0 parents  commit 65ce41a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Diff for: README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Docker-SRS
2+
3+
Docker for [SRS](https://github.com/ossrs/srs).
4+
5+
Winlin, 2021.03

Diff for: auto/get_host_ip.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Get host ip4 of interface eth0/en0/eth1.
4+
5+
# 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

Comments
 (0)