Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !/sbin/openrc-run
- # Copyright 1999-2011 Gentoo Foundation
- # Distributed under the terms of the GNU General Public License v2
- cfgfile=/etc/conf.d/rtorrentd.conf
- command=/usr/bin/rtorent
- command_user=rtorrent
- pidfile=/var/run/rtorrent.pid
- config=/home/rtorrent/rtorrent/.rtorrent.rc
- group=fileserv
- command_args=-n -o import=/home/rtorrent/.rtorrent.rc
- depend() {
- use net ypbind nis
- after slapd mysqld postgresql
- }
- start_pre() {
- # (Commands necessary to prepare to start the service)
- # Ensure that our dirs are correct
- checkpath --directory --owner rtorrent:rtorrent --mode 0775 \
- /var/run/rtorrent /var/cache/rtorrent
- }
- start() {
- PWHOME="$(getent passwd $USER | awk -F: '{ print $6 }')"
- ebegin "Starting rtorrent"
- start-stop-daemon \
- --start \
- --make-pidfile \
- --pidfile /var/run/rtorrentd.pid \
- --exec /usr/bin/rtorrent -n -o import=/home/rtorrrent/.rtorrent.rc\
- eend $?
- }
- stop() {
- ebegin "Stopping rtorrent"
- start-stop-daemon --stop --signal 15 \
- --pidfile /var/run/rtorrentd.pid
- eend $?
- }
- ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement