pprotectd this is a self protected daemon which protect processes

from killing by the kernel when memory is exhausted.

The P_PROTECTED flag protects processes from killing by the kernel
when memory is exhausted. This may be useful for protection many
critical daemons, such as cron, syslogd, inetd, sshd or mysqld.

WWW: http://www.zonov.org/

PR:		ports/151774
Submitted by:	Andrey Zonov <andrey.zonov@gmail.com>
This commit is contained in:
Pav Lucistnik
2011-08-08 20:07:22 +00:00
parent 2a282d3588
commit 63cc16e46f
5 changed files with 69 additions and 0 deletions

View File

@@ -660,6 +660,7 @@
SUBDIR += polkit-qt
SUBDIR += powerman
SUBDIR += pp
SUBDIR += pprotectd
SUBDIR += prips
SUBDIR += procmap
SUBDIR += progsreiserfs

View File

@@ -0,0 +1,25 @@
# New ports collection makefile for: pprotectd
# Date created: 15 July 2010
# Whom: Andrey Zonov <andrey@zonov.org>
#
# $FreeBSD$
#
PORTNAME= pprotectd
PORTVERSION= 0.1
CATEGORIES= sysutils
MASTER_SITES= http://www.zonov.org/${PORTNAME}/
MAINTAINER= andrey@zonov.org
COMMENT= A daemon that protects processes from killing when memory is exhausted
USE_RC_SUBR= ${PORTNAME}
PLIST_FILES= sbin/${PORTNAME}
MAN8= ${PORTNAME}.8
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/${MAN8} ${MANPREFIX}/man/man8
.include <bsd.port.mk>

View File

@@ -0,0 +1,2 @@
SHA256 (pprotectd-0.1.tar.gz) = d25909d8030f3aca0f8e1d443c601787029773c88fa0209f49c58d7614c1c4a1
SIZE (pprotectd-0.1.tar.gz) = 4752

View File

@@ -0,0 +1,33 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: pprotectd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable pprotectd:
#
# pprotectd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable pprotectd
# pprotectd_pidfiles (str): Set to "/var/run/cron.pid,/var/run/syslog.pid" by default.
# Set it to "/var/run/sshd.pid" for example
# pprotectd_flags (str): Set to "" by default.
# See pprotectd(8) for pprotectd_flags
#
. /etc/rc.subr
name="pprotectd"
rcvar=`set_rcvar`
load_rc_config "$name"
: ${pprotectd_enable="NO"}
: ${pprotectd_pidfiles="/var/run/cron.pid,/var/run/syslog.pid"}
: ${pprotectd_flags=""}
command="/usr/local/sbin/pprotectd"
command_args="-F ${pprotectd_pidfiles}"
run_rc_command "$1"

View File

@@ -0,0 +1,8 @@
pprotectd this is a self protected daemon which protect processes
from killing by the kernel when memory is exhausted.
The P_PROTECTED flag protects processes from killing by the kernel
when memory is exhausted. This may be useful for protection many
critical daemons, such as cron, syslogd, inetd, sshd or mysqld.
WWW: http://www.zonov.org/