Make service for an executable program ubuntu

i got an executable program in the /usr/sbin directory. I want to facilitate the start process by making it into service to start, stop or restart. ps still beginner.

Thanks, Varoon

Depends on your OS. Ubuntu you can use systemd.

Linode has a good tutorial on creating systemd services. I’ve done this in the past to autostart a nodejs server on boot.

Your unit file will look something like this (at the bare minimum)…

Description=Example systemd service.

ExecStart=/bin/bash /usr/sbin/myBinary


There are a bunch of directives you can add to your .service file, which you can find here. Good luck!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.