Bug#843778: needrestart: restart systemd user daemons and user services
On Debian 9.8 restarting the systemd user services as root with "systemctl restart user@.service" works for me: # needrestart [...] User sessions running outdated binaries: root @ user manager service: systemd[6372] admin @ user manager service: systemd[2398] # systemctl | grep user@ user@0.serviceloaded active running User Manager for UID 0 user@1000.service loaded active running User Manager for UID 1000 # systemctl restart user@0.service # systemctl restart user@1000.service # needrestart [...] No user sessions are running outdated binaries. I hope this helps, Marco -- OpenPGP Key ID: 0x62937F7F
Bug#843778: needrestart: restart systemd user daemons and user services
Hello, I've seen that needrestart reports the user processes when run as user. Could you extend needrestart to show the dialogue and restart the systemd units: ``` % id -u 1000 % needrestart Prüfe Prozesse... Veraltete Prozesse: dbus-daemon[885], emacs[12635], firefox[30570], firefox-bin[20556], Privileged Cont[26250], pulseaudio[29837], Web Content[21597], WebExtensions[20752], Xorg[12276] % systemctl --user status -n0 29837 30570 2>/dev/null |grep '^●' |sed 's/ -.*//; s/.* //' |uniq pulseaudio.service ff.service % systemctl --user restart pulseaudio.service ``` Regards Jörg -- Die Erde ist das einzigste Irrenhaus, das von seinen eigenen Insassen verwaltet wird. (U. Schmidt) signature.asc Description: PGP signature
Bug#843778: needrestart: restart systemd user daemons and user services
On Wed, 09 Nov 2016 22:25:25 +0800 Paul Wise wrote: > systemd can run its daemon as a user and manage services for that user. > The user services can be restarted in much the same way as system services. Turns out you cannot restart user services via sudo. > It would be great that instead of listing these daemons in the outdated > binaries section, needrestart would list the commands to restart them: So I think the way it should work is for needrestart to signal every needrestart-session process to do the supervisor and service restarting, wait for the completion of these restarts, update the list of processes needing restarting and then print any that are still needing restarting. -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#843778: needrestart: restart systemd user daemons and user services
Package: needrestart Severity: wishlist systemd can run its daemon as a user and manage services for that user. The user services can be restarted in much the same way as system services. It would be great that instead of listing these daemons in the outdated binaries section, needrestart would list the commands to restart them: sudo -u uid systemctl --user daemon-reexec sudo -u uid systemctl --user restart name.service other.service # systemctl status ● chianamo State: running Jobs: 0 queued Failed: 0 units Since: ... CGroup: / ... └─user.slice ├─user-1000.slice │ ├─user@1000.service │ │ ├─gpg-agent.service │ │ │ └─1931 /usr/bin/gpg-agent --supervised │ │ ├─dirmngr.service │ │ │ └─20314 /usr/bin/dirmngr --daemon --homedir /home/pabs/.gnupg │ │ └─init.scope │ │ ├─1927 /lib/systemd/systemd --user │ │ └─1929 (sd-pam) ... # needrestart Scanning processes... Scanning candidates... Scanning linux images... ... Services to be restarted: ... Services being skipped: ... No containers need to be restarted. User sessions running outdated binaries: Debian-gdm @ user manager service: systemd[1527] pabs @ session #2: ... pabs @ user manager service: systemd[1927] root @ session #306: gpg-agent[14884] root @ user manager service: systemd[16906] -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part