cmvr-es/scripts/systemd/cmvr-es.service

32 lines
1.3 KiB
Desktop File

[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