gregthegeek

btsync freebsd startup script

Sep 15th, 2013
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # PROVIDE: btsync
  4. # REQUIRE: LOGIN DAEMON NETWORKING
  5. # KEYWORD: shutdown
  6. #
  7. # To enable BTSync, add this line to your /etc/rc.conf:
  8. #
  9. # btsync_enable="YES"
  10. #
  11. # And optionally these line:
  12. #
  13. # btsync_user="root" # Default is "root"
  14. # btsync_bin="/usr/local/etc/btsync" # Default is "/usr/local/sbin/btsync"
  15.  
  16. . /etc/rc.subr
  17.  
  18. name="btsync"
  19. rcvar="btsync_enable"
  20.  
  21. load_rc_config $name
  22.  
  23. required_files=$btsync_bin
  24.  
  25. : ${btsync_enable="NO"}
  26. : ${btsync_user="root"}
  27. : ${btsync_bin="/usr/local/bin/btsync"}
  28. : ${btsync_config="/usr/local/etc/btsync.conf"}
  29.  
  30. command=$btsync_bin
  31. command_args="--config ${btsync_config}"
  32.  
  33. run_rc_command "$1"
Add Comment
Please, Sign In to add comment