- Raspberry Pi Mapped network disk
sudo mount-t cifs-o username=jerry.huang,password=hello2014//10.10.0.1/public/eslpod.com/home/ pi/t/eslpod.com/
- Raspberry Pi save file with sudo nano edit
Modify static IP, you need to modify the/etc/network/interfaces file
Original file contents
Auto loiface lo inet loopbackiface eth0 inet dhcpallow-hotplug wlan0iface wlan0 inetMANUALWPA-roam/etc /wpa_supplicant/wpa_supplicant.confiface default inet DHCP
Modify to static IP
10.10. 0.91 255.255. 255.0 10.10. 0.254 Allow-hotplug wlan0iface wlan0 inet manualwpa-roam/etc/wpa_supplicant/Wpa_ Supplicant.confiface Default inet DHCP
Edit Auto-timer task /etc/crontab
8, - 8- A, -- -* *1-5Root/home/pi/playeslpod.SH - 8- A, -- -* *1-5Root/home/pi/playnews.SH0 -* *1-5Root/home/pi/playnews.SH5 -* *1-5Root/home/pi/stopmplayer.SH - -* *1-5Root/home/pi/stopmplayer.SH0 0* *6-7Root/home/pi/stopmplayer.SH - -* *1-5Root/home/pi/playmusic.SH0 -* *1-5Root/home/pi/stopmplayer.SH
- Play a MP3, webcast script
Play local music playeslpod.sh
#!/bin/shsudo pkill-f mplayer; sudo mplayer-shuffle/home/pi/t/eslpod.com/* </dev/null >/dev/null 2>1&
playeslpod.sh CodePlay Network playnews.sh
#!/bin/shsudo pkill-f mplayer; sudo 0 -playlist "http://rthk.hk/live2.m3u" </dev/null >/dev/ NULL 2>1&
playnews.sh CodePlay runmplayer.sh
#!/bin/shif (PS -a| grep"mplayer"); Then sudo pkill-f mplayer; fi sudo 0 -playlist "http://rthk.hk/live$1.m3u" </dev/NULL >/dev/null2>1&
runmplayer.sh CodeStop stopmplayer.sh
#!/bin/shsudo pkill-f mplayer;
stopmplayer.sh Code
Raspberry Pi Play Network disk MP3 file