calico.in 785 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # PROVIDE: calico
  3. # REQUIRE: LOGIN
  4. # KEYWORD: shutdown
  5. # Add the following lines to /etc/rc.conf to enable calico:
  6. #
  7. # calico_enable="YES"
  8. #
  9. # The calico socket directory is set by the calico_path variable.
  10. # The default is calico_path="/var/run/calico".
  11. . /etc/rc.subr
  12. name='calico'
  13. rcvar='calico_enable'
  14. load_rc_config "${name}"
  15. : ${calico_enable:='NO'}
  16. : ${calico_path:="/var/run/${name}"}
  17. calico_flags="${calico_flags} ${calico_path}"
  18. command='/usr/sbin/daemon'
  19. procname='%%PREFIX%%/bin/calico'
  20. pidfile="/var/run/${name}.pid"
  21. required_dirs=$calico_path
  22. child_flags=$calico_flags
  23. child_user=$calico_user
  24. unset calico_flags calico_user
  25. command_args="\
  26. -p ${pidfile} -T ${name} ${child_user:+-u ${child_user}} \
  27. -- ${procname} ${child_flags}"
  28. run_rc_command "$1"