34 lines
710 B
Bash
34 lines
710 B
Bash
#!/bin/sh
|
|
|
|
# --- CONFIGURATION ---
|
|
IP=${STATIC_IP:-"192.168.0.117/24"}
|
|
GW=${STATIC_GW:-"192.168.0.1"}
|
|
DNS=${STATIC_DNS:-"192.168.0.113"}
|
|
|
|
echo "--- Nextcloud Talk Network Init ---"
|
|
echo "Using IP: $IP"
|
|
|
|
# 1. Generate Network Config (Alpine Syntax)
|
|
cat <<EOF > /etc/network/interfaces
|
|
auto lo
|
|
iface lo inet loopback
|
|
|
|
auto eth0
|
|
iface eth0 inet static
|
|
address $IP
|
|
gateway $GW
|
|
EOF
|
|
|
|
# 2. Set DNS
|
|
echo "nameserver $DNS" > /etc/resolv.conf
|
|
|
|
# 3. Wait for Hardware & Start Network
|
|
sleep 5
|
|
ifup eth0
|
|
|
|
# 4. Launch Talk Server
|
|
echo "--- Starting Spreed Backend ---"
|
|
# The official entrypoint expects a config file or arguments.
|
|
# We exec the original command passed to the container.
|
|
exec /usr/bin/signaling "$@"
|