Skip to content
/dev/zeyu
Go back

Linux Daemon Service Template

Create a template to allow a user app running as a daemon.

[Unit]
Description=Health Monitor

[Service]
Type=simple
ExecStart=/usr/bin/healthmon
ExecStop=/bin/kill -s QUIT $MAINPID
StandardOutput=file:/var/log/healthmon.log
StandardError=file:/var/log/healthmon.log

[Install]
WantedBy=multi-user.target

Use systemctl to start and stop.


Share this post on:

Previous Post
WordPress Setup and SSL
Next Post
Quick Note: Docker