diff options
author | pav <pav@FreeBSD.org> | 2011-08-09 04:07:22 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2011-08-09 04:07:22 +0800 |
commit | d83186f2025368473ad068a0ab6cf4ac3332f580 (patch) | |
tree | dc9620b1a5296e169e3b462355869ef0df5ea6f6 | |
parent | 99097e4dfe15c60cb80c0f3d179cf11ea2927376 (diff) | |
download | freebsd-ports-graphics-d83186f2025368473ad068a0ab6cf4ac3332f580.tar.gz freebsd-ports-graphics-d83186f2025368473ad068a0ab6cf4ac3332f580.tar.zst freebsd-ports-graphics-d83186f2025368473ad068a0ab6cf4ac3332f580.zip |
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>
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/pprotectd/Makefile | 25 | ||||
-rw-r--r-- | sysutils/pprotectd/distinfo | 2 | ||||
-rw-r--r-- | sysutils/pprotectd/files/pprotectd.in | 33 | ||||
-rw-r--r-- | sysutils/pprotectd/pkg-descr | 8 |
5 files changed, 69 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 456ad0de31c..f30a407c612 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -660,6 +660,7 @@ SUBDIR += polkit-qt SUBDIR += powerman SUBDIR += pp + SUBDIR += pprotectd SUBDIR += prips SUBDIR += procmap SUBDIR += progsreiserfs diff --git a/sysutils/pprotectd/Makefile b/sysutils/pprotectd/Makefile new file mode 100644 index 00000000000..6f2fc39dd7e --- /dev/null +++ b/sysutils/pprotectd/Makefile @@ -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> diff --git a/sysutils/pprotectd/distinfo b/sysutils/pprotectd/distinfo new file mode 100644 index 00000000000..45f17d0365c --- /dev/null +++ b/sysutils/pprotectd/distinfo @@ -0,0 +1,2 @@ +SHA256 (pprotectd-0.1.tar.gz) = d25909d8030f3aca0f8e1d443c601787029773c88fa0209f49c58d7614c1c4a1 +SIZE (pprotectd-0.1.tar.gz) = 4752 diff --git a/sysutils/pprotectd/files/pprotectd.in b/sysutils/pprotectd/files/pprotectd.in new file mode 100644 index 00000000000..e59e33ae7ee --- /dev/null +++ b/sysutils/pprotectd/files/pprotectd.in @@ -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" diff --git a/sysutils/pprotectd/pkg-descr b/sysutils/pprotectd/pkg-descr new file mode 100644 index 00000000000..913119f5c52 --- /dev/null +++ b/sysutils/pprotectd/pkg-descr @@ -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/ |