chore(systemd): add CMVR ES service unit
This commit is contained in:
parent
68286bf220
commit
b6a7c8a2b4
31
scripts/systemd/cmvr-es.service
Normal file
31
scripts/systemd/cmvr-es.service
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=CMVR ES (CAN -> EtherCAT enp2s0 -> runtime)
|
||||||
|
Wants=network-online.target
|
||||||
|
Requires=sys-subsystem-net-devices-can0.device sys-subsystem-net-devices-can1.device sys-subsystem-net-devices-can2.device sys-subsystem-net-devices-can3.device
|
||||||
|
After=network-online.target sys-subsystem-net-devices-can0.device sys-subsystem-net-devices-can1.device sys-subsystem-net-devices-can2.device sys-subsystem-net-devices-can3.device itekon-can@can0.service itekon-can@can1.service itekon-can@can2.service itekon-can@can3.service
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=cmvr
|
||||||
|
Group=cmvr
|
||||||
|
SupplementaryGroups=plugdev
|
||||||
|
WorkingDirectory=/home/cmvr/project/cmvr-es/output/bin
|
||||||
|
Environment=LD_LIBRARY_PATH=/home/cmvr/project/cmvr-es/output/lib
|
||||||
|
ExecStartPre=+/bin/bash -e /home/cmvr/project/cmvr-es/scripts/start_can.sh
|
||||||
|
ExecStartPre=+/bin/bash /home/cmvr/project/cmvr-es/scripts/ethercat/start_ethercat.sh enp2s0
|
||||||
|
ExecStart=/home/cmvr/project/cmvr-es/output/bin/cmvr_es
|
||||||
|
ExecStopPost=+/bin/bash /home/cmvr/project/cmvr-es/scripts/ethercat/stop_ethercat.sh enp2s0
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
TimeoutStartSec=120
|
||||||
|
TimeoutStopSec=30
|
||||||
|
KillSignal=SIGTERM
|
||||||
|
LimitRTPRIO=99
|
||||||
|
LimitMEMLOCK=infinity
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
Reference in New Issue
Block a user