View | Details | Raw Unified | Return to bug 277003 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/ports/wip/munge/files/munged.in 2024-02-12 07:54:19.875467000 -0600 (-4 / +17 lines)
Lines 7-13 Link Here
7
# Add the following line to /etc/rc.conf to enable munged:
7
# Add the following line to /etc/rc.conf to enable munged:
8
# munged_enable (bool): Set to "NO" by default.
8
# munged_enable (bool): Set to "NO" by default.
9
#                       Set it to "YES" to enable munged.
9
#                       Set it to "YES" to enable munged.
10
# munged_keyfile (str): Set to "/usr/local/etc/munge/munge.key" by default.
10
# munged_keyfile (str): Set to "%%PREFIX%%/etc/munge/munge.key" by default.
11
#                       Custom munge key.
11
#                       Custom munge key.
12
# munged_pidfile (str): Set to "/var/run/munged.pid" by default.
12
# munged_pidfile (str): Set to "/var/run/munged.pid" by default.
13
#                       Custom PID file path and name.
13
#                       Custom PID file path and name.
Lines 31-40 Link Here
31
31
32
munged_stop()
32
munged_stop()
33
{
33
{
34
       if [ -f "${pidfile}" ]; then
34
    echo "Stopping $name."
35
               kill `cat ${pidfile}`
35
    registered_pid=$(cat $pidfile)
36
       fi
37
36
37
    pids="$registered_pid $(pgrep -d ' ' $name)"
38
    if [ -n "$pids" ]; then
39
        echo "Waiting for PIDs: $pids"
40
        for signal in TERM INT QUIT KILL
41
        do
42
            kill -s $signal $pids
43
            sleep 1
44
            pids=$(pgrep -d ' ' $name)
45
            if [ -z "$pids" ]; then
46
                break
47
            fi
48
        done
49
    fi
50
    rm -f $pidfile
38
}
51
}
39
52
40
run_rc_command "$1"
53
run_rc_command "$1"

Return to bug 277003