Outils pour utilisateurs

Outils du site


tech:systemd_-_lingering

SystemD - lingering

loginctl disable-linger jean
loginctl enable-linger jean
loginctl show-user $(id -u)

L'activation du lingering crée un fichier vide au nom de l'utilisateur dans le dossier /var/lib/systemd/linger/

mkdir -p ~/.config/systemd/user
restorecon -rv ~/.config/

~/.bashrc

export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export XDG_RUNTIME_DIR=/run/user/$(id -u)

~/.config/systemd/user/plop.service

[Unit]
Description=Script plop
After=syslog.target network.target network-online.target
Wants=network.target network-online.target
 
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/opt/plop/bin/init.sh start
ExecStop=/opt/plop/bin/init.sh stop
RemainAfterExit=yes
 
[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable plop.service
tech/systemd_-_lingering.txt · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki