- Run main process as root and drop worker privileges
PR: 250904 Submitted by: Alexander Moisseev <moiseev at mezonplus.ru>
This commit is contained in:
parent
54c8cf842d
commit
ec48df1166
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=554311
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= rspamd
|
||||
PORTVERSION= 2.6.a1.20200929
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= mail
|
||||
PKGNAMESUFFIX= -devel
|
||||
|
||||
|
@ -5,6 +5,9 @@
|
||||
|
||||
rspamd_enable="YES"
|
||||
|
||||
- Optionally you can adjust the user which runs Rspamd workers with the
|
||||
variables rspamd_worker_user and rspamd_worker_group (default rspamd:rspamd).
|
||||
|
||||
- A symbolic link to %%ETCDIR%%/rspamd.newsyslog.conf
|
||||
has been created in the /usr/local/etc/newsyslog.conf.d directory.
|
||||
You can edit %%ETCDIR%%/rspamd.newsyslog.conf
|
||||
|
@ -12,9 +12,9 @@
|
||||
# rspamd_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable rspamd.
|
||||
#
|
||||
# rspamd_user (str): Default to "rspamd".
|
||||
# rspamd_worker_user (str): Default to "rspamd".
|
||||
#
|
||||
# rspamd_group (str): Default to "rspamd".
|
||||
# rspamd_worker_group (str): Default to "rspamd".
|
||||
#
|
||||
# rspamd_flags (str): Default to "-c %%PREFIX%%/etc/rspamd.conf".
|
||||
|
||||
@ -26,8 +26,8 @@ rcvar=rspamd_enable
|
||||
load_rc_config $name
|
||||
|
||||
: ${rspamd_enable:="NO"}
|
||||
: ${rspamd_user="rspamd"}
|
||||
: ${rspamd_group="rspamd"}
|
||||
: ${rspamd_worker_user="rspamd"}
|
||||
: ${rspamd_worker_group="rspamd"}
|
||||
: ${rspamd_flags="-c %%PREFIX%%/etc/rspamd/rspamd.conf"}
|
||||
|
||||
pidfile=${rspamd_pidfile:-"/var/run/rspamd/rspamd.pid"}
|
||||
@ -40,7 +40,7 @@ configtest_cmd="rspamd_checkconfig"
|
||||
reopenlog_cmd="reopenlog_cmd"
|
||||
|
||||
required_files=%%PREFIX%%/etc/rspamd/rspamd.conf
|
||||
command_args="-u ${rspamd_user} -g ${rspamd_group}"
|
||||
command_args="-u ${rspamd_worker_user} -g ${rspamd_worker_group}"
|
||||
extra_commands="reload configtest reopenlog"
|
||||
stop_postcmd="rm -f $pidfile"
|
||||
sig_reload="HUP"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= rspamd
|
||||
PORTVERSION= 2.6
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= mail
|
||||
|
||||
MAINTAINER= vsevolod@FreeBSD.org
|
||||
|
@ -5,6 +5,9 @@
|
||||
|
||||
rspamd_enable="YES"
|
||||
|
||||
- Optionally you can adjust the user which runs Rspamd workers with the
|
||||
variables rspamd_worker_user and rspamd_worker_group (default rspamd:rspamd).
|
||||
|
||||
- A symbolic link to %%ETCDIR%%/rspamd.newsyslog.conf
|
||||
has been created in the /usr/local/etc/newsyslog.conf.d directory.
|
||||
You can edit %%ETCDIR%%/rspamd.newsyslog.conf
|
||||
|
@ -12,9 +12,9 @@
|
||||
# rspamd_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable rspamd.
|
||||
#
|
||||
# rspamd_user (str): Default to "rspamd".
|
||||
# rspamd_worker_user (str): Default to "rspamd".
|
||||
#
|
||||
# rspamd_group (str): Default to "rspamd".
|
||||
# rspamd_worker_group (str): Default to "rspamd".
|
||||
#
|
||||
# rspamd_flags (str): Default to "-c %%PREFIX%%/etc/rspamd.conf".
|
||||
|
||||
@ -26,8 +26,8 @@ rcvar=rspamd_enable
|
||||
load_rc_config $name
|
||||
|
||||
: ${rspamd_enable:="NO"}
|
||||
: ${rspamd_user="rspamd"}
|
||||
: ${rspamd_group="rspamd"}
|
||||
: ${rspamd_worker_user="rspamd"}
|
||||
: ${rspamd_worker_group="rspamd"}
|
||||
: ${rspamd_flags="-c %%PREFIX%%/etc/rspamd/rspamd.conf"}
|
||||
|
||||
pidfile=${rspamd_pidfile:-"/var/run/rspamd/rspamd.pid"}
|
||||
@ -40,7 +40,7 @@ configtest_cmd="rspamd_checkconfig"
|
||||
reopenlog_cmd="reopenlog_cmd"
|
||||
|
||||
required_files=%%PREFIX%%/etc/rspamd/rspamd.conf
|
||||
command_args="-u ${rspamd_user} -g ${rspamd_group}"
|
||||
command_args="-u ${rspamd_worker_user} -g ${rspamd_worker_group}"
|
||||
extra_commands="reload configtest reopenlog"
|
||||
stop_postcmd="rm -f $pidfile"
|
||||
sig_reload="HUP"
|
||||
|
Loading…
Reference in New Issue
Block a user