summaryrefslogtreecommitdiff
path: root/sys-process/acct/files/acct.service
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process/acct/files/acct.service')
-rw-r--r--sys-process/acct/files/acct.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys-process/acct/files/acct.service b/sys-process/acct/files/acct.service
new file mode 100644
index 000000000000..85a4cd3f7bcc
--- /dev/null
+++ b/sys-process/acct/files/acct.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Kernel process accounting
+After=syslog.target
+ConditionPathExists=/var/account
+
+[Service]
+Type=oneshot
+ExecStartPre=/bin/sh -c 'if [ ! -e /var/account/pacct ]; then /bin/touch /var/account/pacct ; /bin/chmod 0600 /var/account/pacct; fi'
+ExecStart=/sbin/accton /var/account/pacct
+ExecStop=/sbin/accton off
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target