Open caiwang opened 9 years ago
Comment by unissoft-bj
Tuesday Jan 27, 2015 at 06:57 GMT
检查待发短信列表,发送提示短信的python chksmsque.py in ihost/smssvc echo "05 8 * * * sudo python /root/chksmsque.py &" >> /var/spool/cron/crontabs/root echo "55 16 * * * sudo python /root/chksmsque.py &" >> /var/spool/cron/crontabs/root
测试发现,reboot后有时候/dev/ttyUSB0可用,有时候/dev/ttyUSB2可用,有时候二者都可用 升级sendsmssimple.py,逐个尝试USB0~9 需要在root下提供10个配置文件:
cp /root/.gammurc /root/.gammurcusb0 sed -i 's|port = /dev/ttyUSB2|port = /dev/ttyUSB0|g' /root/.gammurcusb0
cp /root/.gammurcusb0 /root/.gammurcusb1 cp /root/.gammurcusb0 /root/.gammurcusb2 cp /root/.gammurcusb0 /root/.gammurcusb3 cp /root/.gammurcusb0 /root/.gammurcusb4 cp /root/.gammurcusb0 /root/.gammurcusb5 cp /root/.gammurcusb0 /root/.gammurcusb6 cp /root/.gammurcusb0 /root/.gammurcusb7 cp /root/.gammurcusb0 /root/.gammurcusb8 cp /root/.gammurcusb0 /root/.gammurcusb9
sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB1|g' /root/.gammurcusb1 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB2|g' /root/.gammurcusb2 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB3|g' /root/.gammurcusb3 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB4|g' /root/.gammurcusb4 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB5|g' /root/.gammurcusb5 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB6|g' /root/.gammurcusb6 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB7|g' /root/.gammurcusb7 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB8|g' /root/.gammurcusb8 sed -i 's|port = /dev/ttyUSB0|port = /dev/ttyUSB9|g' /root/.gammurcusb9
cat /root/.gammurcusb0 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb1 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb2 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb3 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb4 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb5 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb6 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb7 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb8 | grep 'port = /dev/ttyUSB' cat /root/.gammurcusb9 | grep 'port = /dev/ttyUSB'