[Bug 238424] net/kafka: fix rc script
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jun 9 18:57:26 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238424
--- Comment #3 from Dmitry Wagin <dmitry.wagin at ya.ru> ---
(In reply to timp87 from comment #2)
1. fixed pidfile/piddir manipulation
before patch when kafka_pidfile="/var/run/kafka.pid", the following occurred:
chown kafka:kafka /var/run
2. added support daemon supervise and restart functionality
> man daemon
-r Supervise and restart the program after a one-second delay if it has been
terminated.
-R restart_delay_seconds Supervise and restart the program after the specified
delay if it has been terminated.
-P supervisor_pidfile Write the ID of the daemon process into the
supervisor_pidfile
The -P option is useful combined with the -r option as supervisor_pidfile
contains the ID of the supervisor not the child. This is especially important
if you use -r in an rc script as the -p option will give you the child's ID to
signal when you attempt to stop the service, causing daemon to restart the
child.
3. added requirement for log directory
required_dirs="${kafka_log_dir}"
as a replacement [ -d "$kafka_log_dir" ] || mkdir -p "$kafka_log_dir"
4. fixed title for the daemon process
I think it is a good idea to always set the process name (-t ${name}), not only
when kafka_syslog_output_enable="YES"
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list