SystemD
Example Service File
[Unit]
Description=My Service Description
After=syslog.target network.target
[Service]
Type=forking
User=username
Group=username
WorkingDirectory=/home/username
ExecStartPre=-/usr/bin/my_app prestart
ExecStart=/usr/bin/my_app start -myopt x
ExecStop=/usr/bin/my_app stop -myopt x
[Install]
WantedBy=multi-user.target