-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config file in /etc/defaults doesn't allow user to be changed for systemd script #791
Comments
Though I still think this is valid, I just found out how to allow other system users access to my main user's pulse server, by following this guide: http://billauer.co.il/blog/2014/01/pa-multiple-users/ And so now I'm running snapclient as the snapclient user again. |
the
The init script will run Snapclient as daemon, what is usual for init.d processes: init.d will just launch a script as root and the script will launch the process, also running as root. The process then forkes itself with a different user (the configured one) and the root process will finish itself. |
OK, I see. Yeah, I think better comments in those two files would go a long way! If the |
It will affact both, systemd and init.d:
The |
Hi @tremby !
I did the following modifications to my outdated Snapclient v0.20.0 to run as my user: --- /lib/systemd/system/snapclient.service 2020-06-11 13:27:52.000000000 +0200
+++ $HOME/.config/systemd/user/snapclient.service 2020-07-29 12:20:09.952184944 +0200
@@ -2,14 +2,14 @@
Description=Snapcast client
Documentation=man:snapclient(1)
Wants=avahi-daemon.service
After=network-online.target time-sync.target sound.target avahi-daemon.service
[Service]
EnvironmentFile=-/etc/default/snapclient
ExecStart=/usr/bin/snapclient --logsink=system $SNAPCLIENT_OPTS
-User=snapclient
-Group=snapclient
+#User=snapclient
+#Group=snapclient
Restart=on-failure
[Install]
-WantedBy=multi-user.target
+WantedBy=default.target I use it with
|
Describe the bug
Though the package seems to have installed both
/etc/init.d/snapclient
and/lib/systemd/system/snapclient.service
it seems to be only the latter which does something. I get weird issues with multiple pulseaudio servers if snapclient doesn't run as my interactive user, so I want it to start as me. But I can't seem to configure it that way via the intended/etc/default/snapclient
file.The file
/etc/init.d/snapclient
was a big red herring here; I was trying to debug via that file but it wasn't even being invoked. Took me a while to realize there was a separate systemd unit.START_SNAPCLIENT
doesn't seem to have any effect either; it's not referenced in the systemd file. Perhaps some comments in there would help with this confusion.Steps to Reproduce
/etc/default/snapclient
, set--user tremby:tremby
inSNAPCLIENT_OPTS
sudo systemctl restart snapclient
ps
output, see that it was still started assnapclient
, even though it does have the new options presentEnvironment details
I've edited the systemd script's user and group entries for now, but this config is surely supposed to be done in the defaults file.
The text was updated successfully, but these errors were encountered: