Tohle jsou jen velice strohé poznámky, ne materiály k samostudiu.
Opakování
systemctl status sshdsystemctl stop sshdsystemctl start sshdsystemctl restart sshdsystemctl cat sshdNastavení systemd
/usr/lib/systemd/system//usr/lib/systemd/system/sshd.service/etc/systemd/system/ – pro administrátora/dev/nullTypy „units“:
ls /usr/lib/systemd/system/ | cut -d. -f2
servicetargetsockettimermountPoužití plného jména:
systemctl status sshd.servicesystemctl status graphical.targetsystemctl cat sshd.servicesystemctl cat sshd.socket(Odbočka k socket?)
systemctl cat graphical.targetZávislosti:
systemctl list-dependencies sshdsystemctl list-dependencies graphical.targetDokumentace:
man systemd.service, ...man systemd.service, man systemd.mountman systemd.timerman systemd.timeman systemd.unit/etc/systemd/system/ahoj.service:
[Unit]
Description=echo
[Service]
Type=oneshot
ExecStart=/usr/bin/echo Ahoj!sudo systemctl daemon-reloadsudo systemctl start ahoj.servicesudo systemctl status ahoj.service/etc/systemd/system/ahoj.timer:
[Unit]
Description=echo timer
[Timer]
OnCalendar=*-*-* *:*:00/10
AccuracySec=1s
Unit=ahoj.servicesudo systemctl daemon-reloadsudo systemctl start ahoj.timersudo systemctl status ahoj.service (!)mkdir -p ~/.config/systemd/user/~/.config/systemd/user/gong.service:
[Unit]
Description=Gong
[Service]
Type=oneshot
ExecStart=/usr/bin/mplayer /usr/share/sounds/gnome/default/alerts/sonar.ogg~/.config/systemd/user/gong.timer:
[Unit]
Description=Gong
[Timer]
OnCalendar=*-*-* *:*:00/10
AccuracySec=1s
Unit=gong.service