Offcourse! I’m happy if I can help someone else
Here’s the text to put in velserv.service:
[Unit]
Description=Velserv
ConditionFileIsExecutable=/opt/velserv/velserv.sh
After=network.target
After=network-online.target
[Service]
Type=forking
ExecStart=/opt/velserv/velserv -d /dev/ttyACM0 -p 6000
ExecStartPost=/bin/bash -c “/bin/touch /var/log/velserv.log”
ExecStartPost=/bin/bash -c “/bin/echo Velserv Started $(date) >> /var/log/velserv.log”
ExecStartPost=/bin/bash -c “/bin/pidof velserv >> /var/log/velserv.log”
ExecStop=/bin/kill $MAINPID
TimeoutSec=0
RemainAfterExit=yes
StandardOutput=journal+console
StandardError=journal+console
[Install]
WantedBy=multi-user.target
This works for me. I hope someone else can test it and confirm it works for them too.
Greets!