#!/bin/sh for MINIDLNA_MEDIA_DIR_CURRENT in $MINIDLNA_MEDIA_DIR; do MINIDLNA_MEDIA_DIR_SHORT=$(echo $MINIDLNA_MEDIA_DIR_CURRENT | grep -vE '^ *#|^ *;|^ *$' | sed 's/.*,//g') [ -d "$MINIDLNA_MEDIA_DIR_SHORT" ] && echo "media_dir=$MINIDLNA_MEDIA_DIR_CURRENT" done if [ -n "$MINIDLNA_NETWORK_INTERFACES" ]; then echo "network_interface=$MINIDLNA_NETWORK_INTERFACES" # first interface only MINIDLNA_NIF1=$(echo "$MINIDLNA_NETWORK_INTERFACES" | sed -rne 's/([^,]+).*/\1/p') else MINIDLNA_NIF1=lan fi MINIDLNA_NIP1=$(ifconfig $MINIDLNA_NIF1 2>/dev/null | sed -rne 's,^ *inet addr: *([0-9.]+) *.*,\1,p') [ -z "$MINIDLNA_NIP1" ] && MINIDLNA_NIP1="192.168.178.1" cat <