summaryrefslogtreecommitdiffstats
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-21 03:38:32 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-21 03:38:32 +0200
commitf0a73e245c1646c6c62a3bd0a3db969dd2e55edc (patch)
treea181fc10fada09303acd05795b2980978e2e738f /units
parentvconsole: make sure we don't merge configuration settings from different sources (diff)
downloadsystemd-f0a73e245c1646c6c62a3bd0a3db969dd2e55edc.tar.xz
systemd-f0a73e245c1646c6c62a3bd0a3db969dd2e55edc.zip
units: add default tmpwatch units
Diffstat (limited to 'units')
-rw-r--r--units/tmpwatch.service21
-rw-r--r--units/tmpwatch.timer14
2 files changed, 35 insertions, 0 deletions
diff --git a/units/tmpwatch.service b/units/tmpwatch.service
new file mode 100644
index 0000000000..55f8f0ac03
--- /dev/null
+++ b/units/tmpwatch.service
@@ -0,0 +1,21 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Cleanup of Temporary Directories
+DefaultDependencies=no
+Wants=local-fs.target
+After=local-fs.target
+Before=poweroff.service reboot.service halt.service killall.service
+
+[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
+
+[Install]
+WantedBy=shutdown.target
diff --git a/units/tmpwatch.timer b/units/tmpwatch.timer
new file mode 100644
index 0000000000..222e3d238b
--- /dev/null
+++ b/units/tmpwatch.timer
@@ -0,0 +1,14 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Daily Cleanup of Temporary Directories
+DefaultDependency=no
+
+[Timer]
+OnBootSec=1d
+OnUnitActiveSec=1d