Comet

  • Diary
  • Travel
  • Fun
  • Tech
  1. Main page
  2. Tech
  3. Main content

Linux Daemon Service Template

January 23, 2021 800hotness 0likes 0comments

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
StandardError=file:/var/log/healthmon.log
StandardError=file:/var/log/healthmon.log

[Install]
WantedBy=multi-user.target

Use systemctl to start and stop.

Tag: 2021 Linux notes
Last updated:January 23, 2021

kasakun

Talk less, smile more.

Like
< Last article
Next article >

Comments

You need to

COPYRIGHT © 2018-2022 Space. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang