mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-11 11:44:37 +02:00
Remove the last binary from the package - it is provided instead by util-linux-login package. This fixes issue #13533. Create openrc subpackage with init script to enable accounting at boot. Add logrotate configuration file. Correct the path of the wtmp file.
32 lines
528 B
Text
32 lines
528 B
Text
#!/sbin/openrc-run
|
|
|
|
description="Enables process accounting."
|
|
|
|
depend() {
|
|
keyword -prefix -lxc -docker
|
|
}
|
|
|
|
: ${acct_dir:=${ACCTDIR:-/var/log/account}}
|
|
: ${acct_file:=${ACCTFILE:-pacct}}
|
|
|
|
|
|
start() {
|
|
if [ ! -d "$acct_dir" ]; then
|
|
mkdir -p $acct_dir
|
|
chmod 770 $acct_dir
|
|
fi
|
|
if [ ! -f "$acct_dir/$acct_file" ]; then
|
|
touch $acct_dir/$acct_file
|
|
chmod 770 $acct_dir/$acct_file
|
|
fi
|
|
|
|
ebegin "Enabling process accounting"
|
|
accton on >/dev/null
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Disabling process accounting"
|
|
accton off
|
|
eend $?
|
|
}
|