sudo touch /etc/systemd/system/foo-daemon.service
sudo chmod 664 /etc/systemd/system/foo-daemon.service
vi /etc/systemd/system/foo-daemon.service
[Unit]
Description=Foo
[Service]
ExecStart=/usr/sbin/foo-daemon
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start foo-daemon
sudo systemctl stop foo-daemon
sudo systemctl restart foo-daemon
systemctl status foo-daemon
sudo systemctl enable foo-daemon
journalctl -u foo-daemon
Visit the systemd.service and systemd.unit man pages.