Systemd

From BCCD 3.0

(Difference between revisions)
Jump to: navigation, search
(Troubleshooting)
(Path cheat sheet)
Line 1: Line 1:
= Path cheat sheet =
= Path cheat sheet =
-
* Place custom units in <code>/etc/systemd</code>:
+
* Place <b>global</b> custom units in <code>/etc/systemd</code>:
** <code>user</code> - start once per login
** <code>user</code> - start once per login
** <code>system</code> - start once per boot
** <code>system</code> - start once per boot
 +
* Place <b>per-user</b> custmo units <code>~/.config/systemd/user</code>
 +
** Use <code><b>systemd</b> --user</code> to manipulate
= Command cheat sheet =
= Command cheat sheet =

Revision as of 23:40, 11 October 2020

Contents

Path cheat sheet

Command cheat sheet

Example unit

[Unit]
Description="Set BCCD user password"

[Service]
ExecStart=/bin/bccd-passwd-wrapper bccd
Type=oneshot

# This service is expected to exit completely even if it is successful
RemainAfterExit=yes

# Do not restart after everything exits
Restart=no

# This service requires user interaction via the TTY
StandardInput=tty
StandardOutput=tty

[Install]
WantedBy=multi-user.target

Troubleshooting

Boot problems

From FreeDesktop's debugging guide

Disabling SysV init redirection

Systemd will generate a wrapper around SysV-style init script, which can make debugging trickier. To disable, set the environment variable _SYSTEMCTL_SKIP_REDIRECT=1.

See https://www.turnkeylinux.org/blog/debugging-systemd-sysv-init-compat for more details

Links

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox