freebsd-skq/etc/rc.d/rctl
Lars Engels 6c1a5e837d - Add descriptions to most of the rc scripts. Those are mostly taken from their
daemon's manpage and probably improved.
- Consistently use "filesystem" not "file system".

Approved by:	bapt, brueffer
Differential Revision:	D452
2016-04-23 16:10:54 +00:00

42 lines
469 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: rctl
# BEFORE: LOGIN
# KEYWORD: nojail
. /etc/rc.subr
name="rctl"
desc="Manage resource limits"
rcvar="rctl_enable"
start_cmd="rctl_start"
stop_cmd="rctl_stop"
rctl_start()
{
if [ -f ${rctl_rules} ]; then
while read var comments
do
case ${var} in
\#*|'')
;;
*)
echo "${var}"
;;
esac
done < ${rctl_rules} | xargs rctl -a
fi
}
rctl_stop()
{
rctl -r :
}
load_rc_config $name
run_rc_command "$1"