diff --git a/HowtoSystemd.md b/HowtoSystemd.md index 1ba59a08..a56a3e7a 100644 --- a/HowtoSystemd.md +++ b/HowtoSystemd.md @@ -177,9 +177,15 @@ Alias=sshd.service # Modifier partiellement une unité On peut « override » une partie de l'unité en créant un fichier dans `/etc/systemd/system/unit.d/` qui précisera les modifications à faire. -La meilleure méthode pour faire ceci est d'utiliser `systemctl edit `. +Exemple avec l'unité de varnish : -Exemple avec ElasticSearch : TODO +Dossier `/etc/systemd/system/varnish.service.d`, fichier `/etc/systemd/system/varnish.service.d/varnish.service` : + +~~~ +[Service] +ExecStart: /usr/sbin/varnishd -a 0.0.0.0:80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,16G -p thread_pools=8 -p thread_pool_add_delay=2 -p thread_pool_min=500 -p thread_pool_max=5000 +ExecReload: /etc/varnish/reload-vcl.sh +~~~ # Utiliser les templates d'unités