freebsd-ports/security/munge/files/munged.in
Martin Wilke 49dfe510bf MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service for creating and
validating credentials. It is designed to be highly scalable for use in an HPC
cluster environment. It allows a process to authenticate the UID and GID of
another local or remote process within a group of hosts having common users and
groups. These hosts form a security realm that is defined by a shared
cryptographic key. Clients within this security realm can create and validate
credentials without the use of root privileges, reserved ports, or
platform-specific methods.

WWW:	http://code.google.com/p/munge/

PR:		ports/166386
Submitted by:	Muhammad Moinur Rahman <5u623l20@gmail.com>
2012-06-10 09:57:43 +00:00

45 lines
862 B
Bash

#!/bin/sh
#
#
# PROVIDE: munged
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable mysql:
# munged_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable munged.
# munged_keyfile (str): Default to "/usr/local/etc/munge/munge.key"
# Default munge key.
# munged_pidfile (str): Custum PID file path and name.
# Default to "/var/run/munged.pid".
#
. /etc/rc.subr
name="munged"
rcvar=munged_enable
stop_cmd="munged_stop"
load_rc_config $name
: ${munged_enable="NO"}
munged_user=root
munged_keyfile="%%PREFIX%%/etc/munge/munge.key"
pidfile="/var/run/munge/${name}.pid"
command="%%PREFIX%%/sbin/${name}"
command_args="--key-file=${munged_keyfile}"
munged_stop()
{
if [ -f "${pidfile}" ]; then
kill -9 `cat ${pidfile}`
sleep 1 # wait a little bit
rm -f /var/run/munge/*
fi
}
run_rc_command "$1"