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
command_args="--key-file=${munged_keyfile}"
Link Here
|
31 |
|
31 |
|
32 |
munged_stop() |
32 |
munged_stop() |
33 |
{ |
33 |
{ |
34 |
if [ -f "${pidfile}" ]; then |
34 |
if checkyesno $rcvar; then |
35 |
kill `cat ${pidfile}` |
35 |
echo "Stopping $name." |
|
|
36 |
pids="$(pgrep -d ' ' $name)" |
37 |
if [ -n "$pids" ]; then |
38 |
echo "Waiting for PIDs: $pids" |
39 |
for signal in TERM INT QUIT KILL |
40 |
do |
41 |
kill -s $signal $pids |
42 |
sleep 1 |
43 |
pids=$(pgrep -d ' ' $name) |
44 |
if [ -z "$pids" ]; then |
45 |
break |
46 |
fi |
47 |
done |
36 |
fi |
48 |
fi |
37 |
|
49 |
rm -f $pidfile |
|
|
50 |
fi |
38 |
} |
51 |
} |
39 |
|
52 |
|
40 |
run_rc_command "$1" |
53 |
run_rc_command "$1" |