Advertisement
Guest User

rtorrentd issues

a guest
Dec 9th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. !/sbin/openrc-run
  2. # Copyright 1999-2011 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4.  
  5. cfgfile=/etc/conf.d/rtorrentd.conf
  6. command=/usr/bin/rtorent
  7. command_user=rtorrent
  8. pidfile=/var/run/rtorrent.pid
  9. config=/home/rtorrent/rtorrent/.rtorrent.rc
  10. group=fileserv
  11. command_args=-n -o import=/home/rtorrent/.rtorrent.rc
  12.  
  13. depend() {
  14. use net ypbind nis
  15. after slapd mysqld postgresql
  16. }
  17.  
  18.  
  19. start_pre() {
  20. # (Commands necessary to prepare to start the service)
  21. # Ensure that our dirs are correct
  22. checkpath --directory --owner rtorrent:rtorrent --mode 0775 \
  23. /var/run/rtorrent /var/cache/rtorrent
  24. }
  25.  
  26. start() {
  27. PWHOME="$(getent passwd $USER | awk -F: '{ print $6 }')"
  28.  
  29. ebegin "Starting rtorrent"
  30. start-stop-daemon \
  31. --start \
  32. --make-pidfile \
  33. --pidfile /var/run/rtorrentd.pid \
  34. --exec /usr/bin/rtorrent -n -o import=/home/rtorrrent/.rtorrent.rc\
  35. eend $?
  36. }
  37.  
  38. stop() {
  39. ebegin "Stopping rtorrent"
  40. start-stop-daemon --stop --signal 15 \
  41. --pidfile /var/run/rtorrentd.pid
  42. eend $?
  43. }
  44. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement