anytermd.in 861 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. #
  3. # $FreeBSD$
  4. #
  5. # PROVIDE: anytermd
  6. # REQUIRE: NETWORKING DAEMON LOGIN cleanvar devfs
  7. # KEYWORD: shutdown
  8. #
  9. # Add the following lines to /etc/rc.conf to enable anytermd:
  10. #
  11. # anytermd_enable (bool): Set to "NO" by default.
  12. # Set it to "YES" to enable anytermd.
  13. #
  14. # anytermd_flags (str): Set to "-c /usr/bin/login -u nobody --local-only"
  15. # by default. See anytermd(1) for flags.
  16. #
  17. # anytermd_name (str): Set to "anyterm" by default.
  18. #
  19. . /etc/rc.subr
  20. name=anytermd
  21. rcvar=anytermd_enable
  22. load_rc_config $name
  23. # Set defaults
  24. : ${anytermd_enable:="NO"}
  25. : ${anytermd_flags:="-c /usr/bin/login -u nobody --local-only"}
  26. : ${anytermd_name:="anyterm"}
  27. pidfile=/var/run/$anytermd_name.pid
  28. command=%%PREFIX%%/sbin/$name
  29. command_args="$anytermd_flags --name $anytermd_name"
  30. run_rc_command "$1"