Skip to content

Commit

Permalink
Disable lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
StayPirate committed Mar 14, 2019
1 parent 42859bc commit e668903
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -50,7 +50,7 @@ If it's not your intention to control rTorrent from a third-party application, d

There is a volume which maps the directory that rTorrent uses to store session data.
This is useful for a couple of reasons.
*First*, when the container is badly stopped and the daemon does not have time to remove its [lock file](https://en.wikipedia.org/wiki/File_locking), you can easily access it from the host system and delete it by yourself.
~~*First*, when the container is badly stopped and the daemon does not have time to remove its [lock file](https://en.wikipedia.org/wiki/File_locking), you can easily access it from the host system and delete it by yourself.~~ Lock file has been disabled from [this commit](https://github.com/StayPirate/alpine-rtorrent/commit/WAITING_FOR_COMMIT_ID), the container can now be automatically restarted.
*Second*, all the information about the downloading torrents will be preserved. Don't forget that it is not a named volume, you need to know the hash of the volume created by your container and you can get it with ```docker container inspect --format '{{ .Mounts }}' rtorrent```. If you prefer, a named volume can be passed by command line which overrides the one in the Dockerfile. It will ensure the operation of switching containers easier. To do it, you need to pass ```-v rtorrent_session:/home/rtorrent/rtorrent/.session``` at container creation time.

## Bind Mounts
Expand Down
4 changes: 4 additions & 0 deletions config.d/00-main.rc
Expand Up @@ -16,6 +16,10 @@ execute.throw = sh, -c, (cat,\
"mkdir -p \"",(cfg.watch),"/load\" ",\
"\"",(cfg.watch),"/start\" ")

## There is no point in using lock file in a docker container since it will only
## give you major headaches if the process dies unexpectedly.
## Moreover, be sure to not use the same session volume with more than one container.
session.use_lock.set = no

## Listening port for incoming peer traffic (fixed; you can also randomize it)
network.port_range.set = 50000-50000
Expand Down

0 comments on commit e668903

Please sign in to comment.