Systemd service files

From artserver wiki
Revision as of 16:48, 24 March 2019 by Andre (talk | contribs) (Created page with "I decided to write this quick n dirty recipe, as I always have to make a few web searches to remind myself on how to do a Linux systemd service file. Very basically a service...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I decided to write this quick n dirty recipe, as I always have to make a few web searches to remind myself on how to do a Linux systemd service file.

Very basically a service file is a set of instructions on how to execute a script/program. Useful parameters such as when the script should start, what do to if there are errors, etc.

  • Location: service files are usually located in /etc/systemd/system/
  • extension: have the extension .service


After creating your myservice.service file:

  • enable it: sudo systemctl enable myservice.service
    • the command with create a symbolic link
  • start the service: sudo systemctl start myservice.service
  • check its status: sudo systemctl satus myservice.service

If after enabled you make changes to the service file, you will need to sudo systemctl daemon-reload to ingrate the changes.


Blog 2019

... more about "Systemd service files"
Date"Date" is a type and predefined property provided by Semantic MediaWiki to represent date values.
2019 +