srvstatus icon indicating copy to clipboard operation
srvstatus copied to clipboard

problem when getting status of user service

Open hsnuhayato opened this issue 3 years ago • 1 comments

Hi, I really like this project. However, when I run telegraf in local as:

$ sudo systemctl start telegraf

Then telegraf was started by user "telegraf". As a result, telegraf was not able to get services started by other by this line in service.py

out = subprocess.Popen(["systemctl", "--user", "status", service], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)  # NOQA

Do you have any idea about this problem? Thanks advance

hsnuhayato avatar Aug 29 '22 14:08 hsnuhayato

Hi @hsnuhayato, I'll try to reproduce this tomorrow, and will see. I guess the problem is in privileges user telegraf may not have rights to access some files, but will check this.

ratibor78 avatar Aug 30 '22 19:08 ratibor78