Outils pour utilisateurs

Outils du site


Panneau latéral

linux:systemd (lu 1255 fois)

Ceci est une ancienne révision du document !


SystemD

Lister les timers

systemctl list-timers --all

Exemple d’un timer

certbot.timer will execute the certbot.service at 12 am and 12 pm.

# cat /lib/systemd/system/certbot.timer
[Unit]
Description=Run certbot twice daily
 
[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=3600
Persistent=true
 
[Install]
WantedBy=timers.target

and certbot.service will execute the renew command.

# cat /lib/systemd/system/certbot.service
[Unit]
Description=Certbot
Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html
Documentation=https://letsencrypt.readthedocs.io/en/latest/
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot -q renew
PrivateTmp=true
linux/systemd.1494840240.txt.gz · Dernière modification: 15-05-2017 11:24 de edmc73