How to restart a systemctl service from within the process

Colin Law clanlaw at gmail.com
Mon Nov 23 10:33:54 UTC 2020


On Mon, 23 Nov 2020 at 10:08, Chris Green <cl at isbd.net> wrote:
>
> On Mon, Nov 23, 2020 at 09:21:54AM +0000, Colin Law wrote:
> > On Sun, 22 Nov 2020 at 15:50, Chris Green <cl at isbd.net> wrote:
> > >
> > > You can have user processes run and handled by systemctl.
> >
> > Does that mean that if I have a service running as a particular user
> > that the user can 'systemctl restart' it without using sudo?
> > Searching hasn't found anything relevant, likely because I am not
> > using the right search terms.
> >
> Yes. I run syncthing using systemd.

Sorry, we are at cross purposes I think.  I am aware that a service
can be run as a user (I am doing that already), the question is
whether that user can somehow run 'systemctl restart' to restart it
without having to use sudo.  It is arguable that that should be
possible, since it is his process.

Colin




More information about the ubuntu-users mailing list