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 |
pids="$(pgrep -d ' ' $name)" |
36 |
fi |
36 |
if [ -n "$pids" ]; then |
37 |
|
37 |
echo "Waiting for PIDs: $pids" |
|
|
38 |
for signal in TERM INT QUIT KILL |
39 |
do |
40 |
kill -s $signal $pids |
41 |
sleep 1 |
42 |
pids=$(pgrep -d ' ' $name) |
43 |
if [ -z "$pids" ]; then |
44 |
break |
45 |
fi |
46 |
done |
47 |
fi |
48 |
rm -f $pidfile |
38 |
} |
49 |
} |
39 |
|
50 |
|
40 |
run_rc_command "$1" |
51 |
run_rc_command "$1" |