Create a Unit file to define a systemd service:
File: sudo vim /etc/systemd/system/myservice.service
[Unit]Description=Extension Name ServiceAfter=network.target[Service]User=rootWorkingDirectory=/usr/local/bin# when using config:# ExecStart=/usr/local/bin/super-tables-linux# when NOT using config:# ExecStart=/usr/local/bin/super-tables-linux –port 443 –cert yourdomain.crt –key yourdomain.keyRestart=always[Install]WantedBy=multi-user.target
This defines a simple service. The critical part is the ExecStart directive, which specifies the command that will be run to start the service.
2. Give the service file the proper permissions
sudochmod644/etc/systemd/system/myservice.service
Start and Enable the Service
1. Once you have a unit file, you are ready to test the service:
sudosystemctlstartmyservice
2. Check the status of the service:
sudosystemctlstatusmyservice
If the service is running correctly, the output should resemble the following: