Systemd

From Wildsong
Revision as of 18:52, 22 May 2016 by Brian Wilson (talk | contribs) (Created page with "Service and timer files go in /lib/systemd/system/ They have to be activated by being enabled and started, for example systemctl daemon-reload systemctl enable backup.serv...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Service and timer files go in /lib/systemd/system/

They have to be activated by being enabled and started, for example

systemctl daemon-reload
systemctl enable backup.service
systemctl start backup.service

Service types

Type= one of these:

oneshot - "simple" but has to exit before follow up services run. It can run several commands stacked in ExecStart=

simple - (default) run one time when started; can be a daemon or just a simple run of a script

idle - like simple, but wait until other services have finished running

forking - use if starting a program that does the traditional fork-and-exit startup; otherwise you want "simple" most of the time

dbus - for services that will run on dbus

notify - your program should send a 'notify' to tell follow ups they can run