examples: improve systemd unit files
Add the PrivateTmp, ProtectHome, and ProtectSystem directives to better secure the system from chronyd. It's taken from the Debian chrony package.
This commit is contained in:
parent
d96f49f67d
commit
7b7eb0a6e5
2 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
[Unit]
|
||||
Description=Wait for chrony to synchronize system clock
|
||||
Documentation=man:chronyc(1)
|
||||
After=chronyd.service
|
||||
Requires=chronyd.service
|
||||
Before=time-sync.target
|
||||
|
|
|
@ -10,6 +10,9 @@ Type=forking
|
|||
PIDFile=/var/run/chronyd.pid
|
||||
EnvironmentFile=-/etc/sysconfig/chronyd
|
||||
ExecStart=/usr/sbin/chronyd $OPTIONS
|
||||
PrivateTmp=yes
|
||||
ProtectHome=yes
|
||||
ProtectSystem=full
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in a new issue