/install/xbt/linux/Tracker/xbtt.sh

http://torrentpier2.googlecode.com/ · Shell · 30 lines · 12 code · 10 blank · 8 comment · 0 complexity · fc664603c580272cffc0bdf8a506eed8 MD5 · raw file

  1. #!/bin/sh
  2. #
  3. # PROVIDE: xbtt
  4. # REQUIRE: NETWORKING mysql
  5. # Add the following line to /etc/rc.conf to enable XBTT:
  6. # xbtt_enable (bool): Set to "NO" by default.
  7. # Set it to "YES" to enable XBTT.
  8. # xbtt_path (str): Path to dir with xbt_tracker.conf
  9. . /etc/rc.subr
  10. name="xbtt"
  11. rcvar=`set_rcvar`
  12. start_precmd="${name}_prestart"
  13. command="/db/www/xbtt/Tracker/xbt_tracker"
  14. : ${xbtt_path="/db/www/xbtt/Tracker"}
  15. xbtt_prestart()
  16. {
  17. cd ${xbtt_path}
  18. }
  19. load_rc_config $name
  20. run_rc_command "$1"