Reorganized
add separate systemd units for use with smd7 as well
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Telnet daemon for AT command
|
||||||
|
|
||||||
|
# Being extra silly with the dependencies for this.
|
||||||
|
# TODO: Update the python code to validate that the serial port
|
||||||
|
# is working on a regular basis, and keep attempting to retry
|
||||||
|
# if not. Then these dependencies won't need to be so strict.
|
||||||
|
After=socat-smd11.service
|
||||||
|
Requires=socat-smd11.service socat-smd11-from-ttyIN.service socat-smd11-to-ttyIN.service
|
||||||
|
ReloadPropagatedFrom=socat-smd11.service socat-smd11-from-ttyIN.service socat-smd11-to-ttyIN.service
|
||||||
|
|
||||||
|
StartLimitIntervalSec=2m
|
||||||
|
StartLimitBurst=100
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usrdata/at-telnet/modem-multiclient.py
|
||||||
|
Nice=5
|
||||||
|
Restart=always
|
||||||
|
RestartSec=2s
|
||||||
|
# Increased log rate limits, so we can see what's going on.
|
||||||
|
LogRateLimitIntervalSec=5s
|
||||||
|
LogRateLimitBurst=100
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Read from /dev/ttyIN and write to smd11
|
||||||
|
BindsTo=socat-smd11.service
|
||||||
|
After=socat-smd11.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/bash -c "/bin/cat /dev/ttyIN > /dev/smd11"
|
||||||
|
ExecStartPost=/bin/sleep 2s
|
||||||
|
StandardInput=tty-force
|
||||||
|
Restart=always
|
||||||
|
RestartSec=1s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Read from /dev/smd11 and write to ttyIN
|
||||||
|
BindsTo=socat-smd11.service
|
||||||
|
After=socat-smd11.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/bash -c "/bin/cat /dev/smd11 > /dev/ttyIN"
|
||||||
|
ExecStartPost=/bin/sleep 2s
|
||||||
|
StandardInput=tty-force
|
||||||
|
Restart=always
|
||||||
|
RestartSec=1s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user