I'm having an issue with ubuntu service that includes Vimba API which is about the Allied Vision Cameras. the application that i built includes Vimba API, tcp/ip server and rs485 communication. It is going to be used in closed loop system so i have to write an ubuntu service. first of all i created a script that runs the application. The script im using is as follows:
#!/bin/sh
user="$(whoami)"
if [ X"$(uname -m)" = X"x86_64" ]
then
arch="x86_64"
elif [ X"$(uname -m)" = X"aarch64" ]
then
arch="arm_64"
fi
echo $user
echo $arch
/home/${user}/Desktop/App/App_Scripts/bin/${arch}bit/changeName jetson1
/home/${user}/Desktop/App/App_Scripts/App.sh
The service im using is as follows:
[Unit]
Description=App Service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=6
User=jetson1
ExecStart=/home/Desktop/App/App_Scripts/App.sh/
[Install]
WantedBy=multi-user.target
When i run the App.sh with my bare hands as a standard user it works but when i start the app service it gives me No Transport Layer error.
i tried to add the necessary libraries or dependencies to the ubuntu service. i changed the script owner and group and also add sudo at the beginning of the command.