How to restart a systemctl service from within the process

Chris Green cl at isbd.net
Mon Nov 23 12:10:28 UTC 2020


On Mon, Nov 23, 2020 at 10:33:54AM +0000, Colin Law wrote:
> 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.
> 

"systemctl restart syncthing at chris.service"


-- 
Chris Green




More information about the ubuntu-users mailing list