No Description https://ascii.town
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rc.torus 734B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. # PROVIDE: torus
  3. # REQUIRE: LOGIN
  4. # KEYWORD: shutdown
  5. . /etc/rc.subr
  6. name=torus
  7. rcvar=torus_enable
  8. load_rc_config ${name}
  9. : ${torus_enable:=NO}
  10. : ${torus_user=torus}
  11. : ${torus_group=${torus_user}}
  12. : ${torus_user:+${torus_chroot=/home/${torus_user}}}
  13. : ${torus_user:+${torus_data_path=/home/${torus_user}/torus.dat}}
  14. : ${torus_user:+${torus_sock_path=/home/${torus_user}/torus.sock}}
  15. torus_flags="\
  16. ${torus_data_path:+-d ${torus_data_path}} \
  17. ${torus_sock_path:+-s ${torus_sock_path}} \
  18. ${torus_flags}"
  19. torus_run=/var/run/${name}
  20. torus_pid=${torus_run}/${name}.pid
  21. required_dirs=${torus_chroot}${torus_run}
  22. pidfile=${torus_chroot}${torus_pid}
  23. command=/bin/server
  24. command_args="-p ${torus_pid}"
  25. run_rc_command "$1"