标签:
sudo mount -t cifs -o username=jerry.huang,password=Hello2014 //10.10.0.1/Public/ESLPod.com /home/pi/t/ESLPod.com/
auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
修改为静态IP
auto lo iface lo inet loopback iface eth0 inet static address 10.10.0.91 netmask 255.255.255.0 gateway 10.10.0.254 allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
编辑自动定时任务/etc/crontab
8,38 8-12,14-17 * * 1-5 root /home/pi/playESLPod.sh 30 8-12,14-17 * * 1-5 root /home/pi/playNews.sh 0 14 * * 1-5 root /home/pi/playNews.sh 5 13 * * 1-5 root /home/pi/stopMplayer.sh 20 18 * * 1-5 root /home/pi/stopMplayer.sh 0 0 * * 6-7 root /home/pi/stopMplayer.sh 30 18 * * 1-5 root /home/pi/playMusic.sh 0 20 * * 1-5 root /home/pi/stopMplayer.sh
播放本地音乐playESLPod.sh
#!/bin/sh sudo pkill -f mplayer; sudo mplayer -shuffle /home/pi/t/ESLPod.com/* < /dev/null > /dev/null 2>1&
播放网络playNews.sh
#!/bin/sh sudo pkill -f mplayer; sudo mplayer -loop 0 -playlist "http://rthk.hk/live2.m3u" < /dev/null > /dev/null 2>1&
播放runMplayer.sh
#!/bin/sh if (ps -A|grep "mplayer");then sudo pkill -f mplayer; fi sudo mplayer -loop 0 -playlist "http://rthk.hk/live$1.m3u" < /dev/null > /dev/null 2>1&
停止stopMplayer.sh
#!/bin/sh sudo pkill -f mplayer;
标签:
原文地址:http://www.cnblogs.com/Mrhuangrui/p/4571336.html