I have a Debian package which installs my software and it needs to start two applications in post install script. First one is daemon and the second one is a background process both are managed with
systemd. The problem is that I run
sudo dpkg -i ... , and it fails to start user level unit with the following error:
Failed to connect to bus: No such file or directory. It is a normal practice to start scripts after installation, but the sudo rights permit me to start my script. Maybe I'm missing something. Someone knows how to overcome this problem?
The command which is use to start script:
systemctl --user start test.service. When it is executed from installer it actually becomes
sudo systemctl --user start test.service.(Same doesn't work from terminal).