much better qmicli@ replacement qmi-network@.service
This commit is contained in:
parent
4ad9a095c9
commit
1ac02dbf81
|
@ -0,0 +1,37 @@
|
|||
# $ cp -v ./qmi-network@.service /etc/systemd/system/
|
||||
# $ systemctl daemon-reload
|
||||
#
|
||||
# $ systemctl enable --now qmi-network@0
|
||||
#
|
||||
# This will NOT work without a .network for your wwan device.
|
||||
[Unit]
|
||||
Description=qmi-network for cdc-wdm%i device
|
||||
|
||||
Before=freepbx.service
|
||||
Before=asterisk.service
|
||||
Before=sys-subsystem-net-devices-wg*.device
|
||||
|
||||
After=sys-subsystem-net-devices-wwan%i.device
|
||||
Wants=sys-subsystem-net-devices-wwan%i.device
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=300s
|
||||
TimeoutSec=300s
|
||||
|
||||
ExecStartPre=networkctl down wwan%i
|
||||
ExecStartPre=sh -c "echo 'Y' | tee /sys/class/net/wwan%i/qmi/raw_ip"
|
||||
|
||||
# Add any qmi-network options here as needed.
|
||||
ExecStartPre=qmi-network /dev/cdc-wdm%i start
|
||||
|
||||
|
||||
ExecStartPre=networkctl up wwan%i
|
||||
ExecStart=sh -e -c "while true; do ping -w 120 -I wwan%i -c 5 one.one.one.one || exit 1; sleep 240; done;"
|
||||
|
||||
ExecStop=networkctl down wwan%i
|
||||
ExecStop=qmi-network /dev/cdc-wdm%i stop
|
||||
|
||||
[Install]
|
||||
WantedBy=sys-subsystem-net-devices-wwan%i.device
|
Loading…
Reference in New Issue