4G&5G模块开机自启与自动重连目标平台:OK3588-C Ubuntu 修改目录:/etc/systemd/system/multi-user.target.wants/5G.service /usr/bin/fltest_quectel.sh /etc/profile.d/5G.sh 1.添加5G服务 vi /etc/systemd/system/5G.service [Unit] Description=5G After=network.target [Service] Type=** PIDfile=/run/quectelCM.pid ExecStart=/usr/bin/quectelCM Restart=always ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/quectelCM.pid TimeoutStartSec=10 RestartSec=3 [Install] WantedBy=multi-user.target :wq systemctl enable 5G 2.重新拉起eth0和eth1 vi /etc/profile.d/5G.sh ifconfig eth1 down && ifconfig eth0 down sleep 1 ifconfig eth0 up sleep 1 ifconfig eth1 up
3.重启查看效果 systemctl status 5G ps -aux |grep quectelCM
|