Created attachment 217621 [details] Adding radicale_flags to rc file This patch will add the possibility to add custom flags using rc.conf. This is useful for example for logging redirection as radicale cannot log to and logs will be printed on the console, but also in other situations where flags are needed.
Created attachment 217652 [details] Adding radicale_flags to rc file Now with version bump.
Sorry but this patch won't work. ${name}_flags is an well known variable used by rc.subr # rc_flags Flags to start the default command with. # Defaults to ${name}_flags, unless overridden # by $flags from the environment. # This variable may be changed by the precmd method. See: https://svnweb.freebsd.org/base/head/libexec/rc/rc.subr?revision=354129&view=markup#l885 and it is used to build the command that is run at line 1123: $command $rc_flags $command_args so we will end up with: /usr/sbin/daemon ${radicale_flags} -P ${pidfile} /usr/local/bin/radicale -C ${radicale_config} ${radicale_flags} which is nonsense. A simple test to verify with radicale_flags="--debug" set: root@radicale:~ # /usr/local/etc/rc.d/radicale restart radicale not running? (check /var/run/radicale/radicale.pid). Starting radicale. daemon: illegal option -- - usage: daemon [-cfrS] [-p child_pidfile] [-P supervisor_pidfile] [-u user] [-o output_file] [-t title] [-l syslog_facility] [-s syslog_priority] [-T syslog_tag] [-m output_mask] [-R restart_delay_secs] command arguments ... /usr/local/etc/rc.d/radicale: WARNING: failed to start radicale
(In reply to Bernhard Froehlich from comment #2) Hello Bernhard, thank you for the feedback. Would it work if we were using "radicale_extra_flags" or "radicale_extra_options" as a variable name? Thank you!
As I already described the patch does not work the way you expected it. Renaming the variable to something else will do.
I'm not using Radicale anymore so this change is not needed.