Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 555284 Details for
Bug 507352
mail-filter/amavisd-new - amavisd init script fails to restart when amavisd has abnormally terminated
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
amavisd.initd-r2
amavisd.initd-r2 (text/plain), 1.56 KB, created by
Michael Orlitzky
on 2018-11-15 19:48:02 UTC
(
hide
)
Description:
amavisd.initd-r2
Filename:
MIME Type:
Creator:
Michael Orlitzky
Created:
2018-11-15 19:48:02 UTC
Size:
1.56 KB
patch
obsolete
>#!/sbin/openrc-run ># Copyright 1999-2018 Gentoo Authors ># Distributed under the terms of the GNU General Public License v2 > >extra_started_commands="reload" >command="/usr/sbin/${RC_SVCNAME}" >pidfile="/run/${RC_SVCNAME}.pid" > ># Why run in the foreground? Typically amavisd will drop privileges ># and then write its own PID file in its home directory. This is fine ># so long as you use e.g. "amavisd stop" to stop the daemon. But, we ># want to use start-stop-daemon to do it. And start-stop-daemon will ># send a signal *as root* to the PID contained in the PID file. So, we ># don't want to rely on a PID file that's controlled by a non-root ># user. ># ># As a workaround, we run amavisd in the foreground, and let ># start-stop-daemon push it into the background with its own PID ># file. We don't pass "-P" via command_args below because we don't ># want amavisd to try (and fail) to create that PID file. This does ># mean that you can't run "amavisd stop" or "amavisd reload" directly; ># sorry! >command_args="foreground" >command_background="true" > ># The amavisd daemon provides its own "stop" and "reload" functions, ># but if you read into the source, they just do what start-stop-daemon ># is going to do anyway. The "stop" command for amavisd will send a ># SIGTERM immediately, and then a SIGKILL after 60 seconds. So, we do ># that too. The "reload" command sends a SIGHUP; see reload() below. >retry="SIGTERM/15 SIGKILL/60" > >depend() { > use net logger antivirus snmpd > before mta >} > >reload() { > ebegin "Reloading ${RC_SVCNAME}" > start-stop-daemon --signal HUP --pidfile "${pidfile}" > eend $? >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 507352
:
374710
|
374958
| 555284