Create a unit file in the /etc/systemd/system/
touch /etc/systemd/system/name.service
chmod 664 /etc/systemd/system/name.service
vim /etc/systemd/system/name.service
[Unit]
Description=service_description
After=network.target
[Service]
ExecStart=path_to_executable
Type=forking
PIDFile=path_to_pidfile[Install]
WantedBy=default.target
Notify systemd that a new name.service file exists
systemctl daemon-reload
systemctl start name.service
Hints:
[Unit] Options:
Requires=new dependency
After=new dependency
[Service] Options:
Type=forking/dbus/simple/notify/oneshot
ExecStart=/usr/bin/@@ start
ExecStop=/usr/bin/@@ stop
Restart=always
RestartSec=30
RemainAfterExit=yes/no
PIDFile=/var/run/@@.pid
Group=
User=
[Install] Options
WantedBy=/multi-user.target
systemctl list-units
systemctl –failed