Thursday 29 June 2017

A simple systemd service template

Using the below template you can easily create a simple systemd init / service script:

sudo vi /usr/lib/systemd/system/myservice.service

and add:

[Unit]
Description=Snort NIDS Daemon
After=syslog.target network.target

[Service]
Type=simple
ExecStart=/usr/bin/myprogram -myparams

Ensure it start on boot:

sudo systemctl enable myservice

and attempt to start it:

sudo service myservice start && sudo service myservice status

0 comments:

Post a Comment