Systemd

From BCCD 3.0

(Difference between revisions)
Jump to: navigation, search
(Path cheat sheet)
Line 5: Line 5:
** <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>
* Place <b>per-user</b> custmo units <code>~/.config/systemd/user</code>
-
** Use <code><b>systemd</b> --user</code> to manipulate
+
** Use <code><b>systemctl</b> --user</code> to manipulate
= Command cheat sheet =
= Command cheat sheet =
Line 21: Line 21:
* Edit service, using EDITOR: <code>systemctl edit --full <i>service-name></i></code>
* Edit service, using EDITOR: <code>systemctl edit --full <i>service-name></i></code>
* Get unit output: <code>journalctl -u <i>unit-name</i></code>
* Get unit output: <code>journalctl -u <i>unit-name</i></code>
 +
* Get timer status: <code>systemctl list-timers</code>
= Example unit =
= Example unit =

Revision as of 23:41, 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