Hi
I’m trying to add a startupscript to my C++ project. The script should start a dbus deamon
#!/bin/bash
echo "Executing startup.sh ..."
/etc/init.d/dbus start
I created startup.sh in appconfig_0 with this content, and entered startup.sh in startupscript configuration. I don’t think the script is ever run. My application complains that there’s no dbus deamon running. Looking in the work folder under appconfig_0, I see startup.sh.debug with the content of my script, but this file is not referenced anywhere in Dockerfile.debug. Am I doing something wrong?
Merijn
Dear @mvandenabeele, how are you?
Could you please share with us how you added the startup script to the configuration and your file folder structure? Have you tried to put in the same folder as the main code?
Best regards,
Sure. The script is added here:

I first put it in the project directory, but then I got an error saying the file appconfig_0/startup.sh couldn’t be found, so I moved it to that directory. The error went away, but it isn’t called.
Dear @mvandenabeele, how are you?
Thanks for the update. To check if my startup script was being run I added the following line to it:
echo "Run Startup" > "/home/torizon/log/test_log.txt"
The folder /home/torizon/log
was mounted on the container and I had this folder on the module as well. This way, I could properly see the creation of a text file on the module. Therefore, it seems to me that the startup script was being properly read. Could you please give it a try and check if the problem is that the script is not being read? If the startup is being properly run, then we may be running onto another problem.

Best regards,
Ah, I see. You’re right. The file is created so the script must have run. I’ll have to figure out how to properly start DBus then.
Thanks for your help!
Dear @mvandenabeele thanks for the update.
If you could open a new thread about it we could help you there on how to enable DBus. You may need to make additional things for your container to use the services.
Best regards,
Dear @mvandenabeele, have you been able to start DBus correctly?
Best regards,
Yes, I got DBus to work more or less (see Access DBus from container). It gets increasingly difficult to use DBus combined with Bluetooth, so we decided to move it to another privileged container and use Python.