Changeset View
Standalone View
mail/mailman3/files/mailman.in
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
#!/bin/sh | |||||
# $FreeBSD$ | |||||
# | |||||
# PROVIDE: mailman | |||||
# REQUIRE: LOGIN | |||||
# KEYWORD: shutdown | |||||
# | |||||
# Add these lines to /etc/rc.conf or /etc/rc.conf.local to enable | |||||
# mailman: | |||||
# | |||||
# mailman_enable (bool): Set to NO by default. | |||||
# Set it to YES to enable mailman. | |||||
# mailman_config (path): Set to %%PREFIX%%/mailman/etc/mailman.cfg | |||||
citrin_bsd_citrin.ru: Probably It is a typo and path shold be "%%PREFIX%%/etc/mailman/mailman.cfg" or just… | |||||
vishwinAuthorUnsubmitted Not Done Inline ActionsNot a typo. Without an explicit config path passed to Mailman, the default behaviour is to create the config under the mailman user's $HOME, which is %%PREFIX%%/mailman. vishwin: Not a typo. Without an explicit config path passed to Mailman, the default behaviour is to… | |||||
matUnsubmitted Not Done Inline ActionsWell, on FreeBSD, configuration files go in PREFIX/etc, please respect that. mat: Well, on FreeBSD, configuration files go in PREFIX/etc, please respect that. | |||||
# by default. | |||||
. /etc/rc.subr | |||||
name=mailman | |||||
rcvar=mailman_enable | |||||
load_rc_config $name | |||||
: ${mailman_enable:=NO} | |||||
: ${mailman_config="%%PREFIX%%/mailman/etc/mailman.cfg"} | |||||
citrin_bsd_citrin.ruUnsubmitted Not Done Inline ActionsSame as bove. citrin_bsd_citrin.ru: Same as bove. | |||||
vishwinAuthorUnsubmitted Not Done Inline ActionsDefault path stands. vishwin: Default path stands. | |||||
command_interpreter=%%PYTHON_CMD%% | |||||
command=%%PREFIX%%/bin/${name} | |||||
start_cmd="mailman_command start" | |||||
stop_cmd="mailman_command stop" | |||||
restart_cmd="mailman_command restart" | |||||
status_cmd="mailman_command status" | |||||
info_cmd="mailman_command info" | |||||
extra_commands=info | |||||
citrin_bsd_citrin.ruUnsubmitted Not Done Inline ActionsPlease add reload to extra_commands. mailman reopens log files on SIGHUP: https://gitlab.com/mailman/mailman/blob/master/src/mailman/bin/master.py#L271 citrin_bsd_citrin.ru: Please add reload to extra_commands. mailman reopens log files on SIGHUP: https://gitlab. | |||||
required_files="%%PREFIX%%/${name}/etc/${name}.cfg" | |||||
citrin_bsd_citrin.ruUnsubmitted Not Done Inline ActionsMay be just required_files="${mailman_config}" ? citrin_bsd_citrin.ru: May be just required_files="${mailman_config}" ? | |||||
pidfile="%%PREFIX%%/${name}/master.pid" | |||||
command_args="-C ${mailman_config}" | |||||
mailman_command() | |||||
{ | |||||
LANG=en_US.UTF-8 /usr/bin/su -m ${name} -c "${command_interpreter} ${command} ${command_args} ${rc_arg}" | |||||
vishwinAuthorUnsubmitted Not Done Inline ActionsIs there a better way to enforce a UTF-8 encoding whilst preserving the user's language setting? Otherwise Mailman fails to run or crashes because dependency devel/py-click absolutely requires a UTF-8 environment. vishwin: Is there a better way to enforce a UTF-8 encoding whilst preserving the user's language setting? | |||||
matUnsubmitted Not Done Inline ActionsYou could probably add a mailman_lang that defaults to en_US.UTF-8. mat: You could probably add a `mailman_lang` that defaults to `en_US.UTF-8`.
And add a check to make… | |||||
} | |||||
run_rc_command "$1" |
Probably It is a typo and path shold be "%%PREFIX%%/etc/mailman/mailman.cfg" or just "%%PREFIX%%/etc/mailman.cfg"