Revision f99cbfbd
b/daemons/daemon-util.in | ||
---|---|---|
311 | 311 |
done |
312 | 312 |
} |
313 | 313 |
|
314 |
# SIGHUP a process to force re-opening its logfiles |
|
315 |
rotate_logs() { |
|
316 |
if [[ "$#" -lt 1 ]]; then |
|
317 |
echo 'Missing daemon name.' >&2 |
|
318 |
return 1 |
|
319 |
fi |
|
320 |
|
|
321 |
local name="$1"; shift |
|
322 |
local pidfile=$(_daemon_pidfile $name) |
|
323 |
local daemonexec=$(_daemon_executable $name) |
|
324 |
|
|
325 |
if type -p start-stop-daemon >/dev/null; then |
|
326 |
start-stop-daemon --stop --signal HUP --quiet \ |
|
327 |
--pidfile $pidfile |
|
328 |
else |
|
329 |
_ignore_error killproc \ |
|
330 |
-p $pidfile \ |
|
331 |
$daemonexec -HUP |
|
332 |
fi |
|
333 |
} |
|
334 |
|
|
335 |
# SIGHUP all processes |
|
336 |
rotate_all_logs() { |
|
337 |
for i in $(list_stop_daemons); do |
|
338 |
rotate_logs $i |
|
339 |
done |
|
340 |
} |
|
341 |
|
|
314 | 342 |
# Reloads the SSH keys |
315 | 343 |
reload_ssh_keys() { |
316 | 344 |
@RPL_SSH_INITD_SCRIPT@ restart |
Also available in: Unified diff