[20e94f]: scripts / updateconffiles  Maximize  Restore  History

Download this file

48 lines (37 with data), 1.6 kB

#!/bin/sh

ipaddr=$(/mnt/flash/root/bin/checkconfig -s ipconfig.ipaddr)
gateway=$(/mnt/flash/root/bin/checkconfig -s ipconfig.gateway)
netmask=$(/mnt/flash/root/bin/checkconfig -s ipconfig.netmask)
dns=$(/mnt/flash/root/bin/checkconfig -s ipconfig.dns)
usedhcp=$(/mnt/flash/root/bin/checkconfig -b ipconfig.usedhcp)


if [ "$usedhcp" == "FALSE" ]; then

	# gen /etc/netcfg
	echo IPADDR="\""$ipaddr"\"" > /etc/netcfg
	echo GATEWAY="\""$gateway"\"" >> /etc/netcfg
	echo NETMASK="\""$netmask"\"" >> /etc/netcfg

	# gen /etc/resolv.conf
	echo nameserver $dns > /etc/resolv.conf

else
	rm /etc/netcfg
	rm /etc/resolv.conf
fi


maxlisteners=$(/mnt/flash/root/bin/checkconfig -i internalserver.maxlisteners)
buffersize=$(/mnt/flash/root/bin/checkconfig -i internalserver.buffersize)

echo "# Port to listen on" > /etc/sighttpd.conf
echo Listen 3000 >> /etc/sighttpd.conf
echo MaxListeners $maxlisteners >> /etc/sighttpd.conf
echo >> /etc/sighttpd.conf
echo "# Static text configuration" >> /etc/sighttpd.conf
echo "<StaticText>" >> /etc/sighttpd.conf
echo "Path \"info\"" >> /etc/sighttpd.conf
echo "Text \"Sighttpd: Ogg Vorbis on stdin (/streamogg)\"" >> /etc/sighttpd.conf
echo "</StaticText>" >> /etc/sighttpd.conf
echo >> /etc/sighttpd.conf
echo "# Streaming Ogg Vorbis from stdin, using the special" >> /etc/sighttpd.conf
echo "# OggStdin module that chaches Ogg Vorbis headers" >> /etc/sighttpd.conf
echo "<OggStdin>" >> /etc/sighttpd.conf
echo "Path \"/stream.ogg\"" >> /etc/sighttpd.conf
echo "Type \"audio/ogg\"" >> /etc/sighttpd.conf
echo Buffersize $buffersize >> /etc/sighttpd.conf
echo "</OggStdin>" >> /etc/sighttpd.conf

sync

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks