by chittu » Wed May 04, 2016 2:14 am
@andiling thank you
the only method I got it working is to edit
$this->bbcode_second_pass_code('', '/usr/lib/systemd/system/mpd.service')
by replacing User=mpd to User=desiredusername
None of the other methods work, A copy of this file (/usr/lib/systemd/system/mpd.service) to
$this->bbcode_second_pass_code('', 'copy to /etc/systemd/system') or dropping the same file as $this->bbcode_second_pass_code('', '/etc/systemd/system/mpd.service.d/myuser.conf')
$this->bbcode_second_pass_code('', 'sudo systemctl enable mpd
results
Created symlink from /etc/systemd/system/default.target.wants/mpd.service to /usr/lib/systemd/system/mpd.service')
but I am surprised to note that if I manually create a file (/etc/systemd/system/default.target.wants/mpd.service) with User=desiredusername and leaving the original (/usr/lib/systemd/system/mpd.service) with User=mpd doesn't work. Both the file (/etc/systemd/system/default.target.wants/mpd.service) and (/usr/lib/systemd/system/mpd.service) should have User=desiredusername