summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-18 22:38:41 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-18 22:38:41 +0200
commit3b63d2d31d0850bd7a81ab9b468218d2c4c461e8 (patch)
tree8c630affc7b088bfa61419b1684a3dd64bb03860 /units
parent12aad1d075a6cfa23920b977146e79d8154f2540 (diff)
tmpfiles: integrate kay's directory cleanup code and otherwise beef up tmpfiles quite a bit
Diffstat (limited to 'units')
-rw-r--r--units/.gitignore2
-rw-r--r--units/systemd-tmpfiles-clean.service.in (renamed from units/tmpwatch.service)6
-rw-r--r--units/systemd-tmpfiles-clean.timer (renamed from units/tmpwatch.timer)2
-rw-r--r--units/systemd-tmpfiles-setup.service.in (renamed from units/systemd-tmpfiles.service.in)3
4 files changed, 8 insertions, 5 deletions
diff --git a/units/.gitignore b/units/.gitignore
index 77d7e28690..464e4bbd4d 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -1,3 +1,5 @@
+systemd-tmpfiles-clean.service
+systemd-tmpfiles-setup.service
halt.service
poweroff.service
reboot.service
diff --git a/units/tmpwatch.service b/units/systemd-tmpfiles-clean.service.in
index 636faf9363..3b27330e02 100644
--- a/units/tmpwatch.service
+++ b/units/systemd-tmpfiles-clean.service.in
@@ -10,10 +10,10 @@ Description=Cleanup of Temporary Directories
DefaultDependencies=no
Wants=local-fs.target
After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
-Before=basic.target poweroff.service reboot.service halt.service killall.service
+Before=basic.target shutdown.target
+ConditionPathExists=/etc/tmpfiles.d
[Service]
Type=oneshot
-ExecStart=/usr/sbin/tmpwatch -umc -x /tmp/.X11-unix -x /tmp/.ICE-unix 10d /tmp
-ExecStart=/usr/sbin/tmpwatch -umc 30d /var/tmp
+ExecStart=@rootlibexecdir@/systemd-tmpfiles --clean
IOSchedulingClass=idle
diff --git a/units/tmpwatch.timer b/units/systemd-tmpfiles-clean.timer
index 54ad57289c..d8529a8d7e 100644
--- a/units/tmpwatch.timer
+++ b/units/systemd-tmpfiles-clean.timer
@@ -9,5 +9,5 @@
Description=Daily Cleanup of Temporary Directories
[Timer]
-OnBootSec=1d
+OnBootSec=15min
OnUnitActiveSec=1d
diff --git a/units/systemd-tmpfiles.service.in b/units/systemd-tmpfiles-setup.service.in
index 855573e2b4..df80e82be9 100644
--- a/units/systemd-tmpfiles.service.in
+++ b/units/systemd-tmpfiles-setup.service.in
@@ -11,8 +11,9 @@ DefaultDependencies=no
Wants=local-fs.target
After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
Before=basic.target shutdown.target
+ConditionPathExists=/etc/tmpfiles.d
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=@rootlibexecdir@/systemd-tmpfiles
+ExecStart=@rootlibexecdir@/systemd-tmpfiles --create --remove