How to implement a Linux daemon in bash that can be start/stop by `sudo service`?

Colin Law clanlaw at gmail.com
Mon Feb 12 08:59:36 UTC 2018


On 12 February 2018 at 00:16, Peng Yu <pengyu.ut at gmail.com> wrote:
> Hi,
>
> There are a lot of resource about creating Linux daemon. But I am not
> sure which is one is the most correct and provide the essential things
> for a Linux daemon in bash that can be start/stop by `sudo service`?
> Would anybody point me the best resource to learn how to create such a
> daemon? Thanks.

On recent Ubuntu systems systemd is used to control such things. It is
easy to write systemd scripts unless the requirements for you daemon
are complex. Google for systemd script tutorials to get you going.

Colin




More information about the ubuntu-users mailing list