summaryrefslogtreecommitdiff
path: root/sysutils/stalepid
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/stalepid')
-rw-r--r--sysutils/stalepid/Makefile30
-rw-r--r--sysutils/stalepid/distinfo1
-rw-r--r--sysutils/stalepid/pkg-descr18
-rw-r--r--sysutils/stalepid/pkg-plist1
4 files changed, 50 insertions, 0 deletions
diff --git a/sysutils/stalepid/Makefile b/sysutils/stalepid/Makefile
new file mode 100644
index 000000000000..3d9e7216a097
--- /dev/null
+++ b/sysutils/stalepid/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: stalepid
+# Date created: 4 December 2003
+# Whom: roam@FreeBSD.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= stalepid
+PORTVERSION= 1.0.b1
+CATEGORIES= sysutils
+MASTER_SITES= http://devel.ringlet.net/sysutils/stalepid/
+DISTNAME= ${PORTNAME}-${PORTVERSION:S/.b/pre/}
+
+MAINTAINER= roam@FreeBSD.org
+COMMENT= Check for stale pid files and remove them
+
+.include <bsd.port.pre.mk>
+RUN_DEPENDS= ${SITE_PERL}/Error.pm:${PORTSDIR}/lang/p5-Error
+.if ${PERL_LEVEL} < 500600
+RUN_DEPENDS+= ${SITE_PERL}/Errno.pm:${PORTSDIR}/devel/p5-Errno
+.endif
+
+USE_PERL5_RUN= yes
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+MAN1= stalepid.1
+MANCOMPRESSED= yes
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/stalepid/distinfo b/sysutils/stalepid/distinfo
new file mode 100644
index 000000000000..d6b147569245
--- /dev/null
+++ b/sysutils/stalepid/distinfo
@@ -0,0 +1 @@
+MD5 (stalepid-1.0pre1.tar.gz) = 45b497e5526c9bd2ea29a9292e891d52
diff --git a/sysutils/stalepid/pkg-descr b/sysutils/stalepid/pkg-descr
new file mode 100644
index 000000000000..0289b57a2c31
--- /dev/null
+++ b/sysutils/stalepid/pkg-descr
@@ -0,0 +1,18 @@
+The stalepid utility was developed to facilitate the startup of servers
+that write their process ID to a file and refuse to start if that file
+exists (e.g. when the process was last terminated by an unclean shutdown,
+or simply killed without given the chance to clean up the process ID
+file). The stalepid utility is used to check for and possibly remove
+those stale process ID files. Upon its invocation, stalepid checks for
+the following conditions:
+- the file specified by the pidfile argument exists;
+- it contains a single line, and the line contains a single number;
+- there is no process with the process ID specified in the file, or if
+ there is one, it is not named processname.
+
+If all those conditions are met, the stalepid utility will remove the
+file specified by the pidfile argument, thus allowing the next invocation
+of the server to proceed normally.
+
+Author: Peter Pentchev <roam@ringlet.net>
+WWW: http://devel.ringlet.net/sysutils/stalepid/
diff --git a/sysutils/stalepid/pkg-plist b/sysutils/stalepid/pkg-plist
new file mode 100644
index 000000000000..95c0802c065c
--- /dev/null
+++ b/sysutils/stalepid/pkg-plist
@@ -0,0 +1 @@
+bin/stalepid