Answer the question
In order to leave comments, you need to log in
Why doesn't script work after running unit in systemd?
There is a small script, there is a unit. The unit starts and no errors occur, but the result of the script is not observed. I think the problem is that the script only runs with superuser rights, that is, if you type
sudo myscript
sudo systemctl start myunit.servicethen again everything works fine. What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
there are three options:
User=юзер
Group=группа
$ sudo systemctl enable XXX.service
$ sudo systemctl start XXX.service
...
$ systemctl --user enable XXX.service
$ systemctl --user start XXX.service
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question