tomhiggins / anyfesto

Low cost Raspberry Pi /Linux based access point with audio, education and communications local content server. Inspired by the ideas of sharing with others. Anyfesto - a platform from which to speak.
http://anyfesto.com
73 stars 12 forks source link

Why Is The IP Not Variable #20

Open tomhiggins opened 3 years ago

tomhiggins commented 3 years ago

Dear lord Tom, in this day and age....hard coding the IP? For the love of all that is good, fix plez.

tomhiggins commented 3 years ago

Have the user set it in the config, and each script, notable the m3u playlists and the VLC launcher, read it live.

From Bish-Bash-Bosh

ip="$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')"

tomhiggins commented 3 years ago

In the PI section these files need to be changed..

While we are at it the hostname/ssid

tomhiggins commented 3 years ago

Add to install script in the configs section For Anyfesto

ip=IpYouWantAnyfestoInstallToHave grep -RiIl '10.11.99.1' | xargs sed -i 's/search/$ip/g'

or for Localfesto

ip="$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')" grep -RiIl '10.11.99.1' | xargs sed -i 's/10.11.99.1/$ip/g'