Simplify the base config by using ~ instead of sed to replace the string USERNAME with the actual user name.

Matthias Braun
2018-12-01 20:09:46 +01:00
parent c046cec05e
commit 0e689212c8
+1 -17
@@ -16,20 +16,6 @@ out that are not applicable to a wide range of people. Place advanced
use-cases in the appropriate sections of the wiki, like the
[Configuration Guide](https://github.com/rakshasa/rtorrent/wiki/Config-Guide).
## Using the Template
Use these commands to get a copy of the template to your disk (note that this **overwrites** an existing `~/.rtorrent.rc` you might have), and create the root directory for your instance:
```sh
curl -Ls "https://raw.githubusercontent.com/wiki/rakshasa/rtorrent/CONFIG-Template.md" \
| sed -ne "/^######/,/^### END/p" \
| sed -re "s:/home/USERNAME:$HOME:" >~/.rtorrent.rc
mkdir -p ~/rtorrent/
```
Then (re-)start rTorrent.
## The Template
Also see [Load Drop-In Config Fragments](http://rtorrent-docs.readthedocs.io/en/latest/use-cases.html#drop-in-config)
@@ -47,7 +33,7 @@ from files in a ``config.d`` directory.
## Instance layout (base paths)
method.insert = cfg.basedir, private|const|string, (cat,"/home/USERNAME/rtorrent/")
method.insert = cfg.basedir, private|const|string, (cat,"~/rtorrent/")
method.insert = cfg.download, private|const|string, (cat,(cfg.basedir),"download/")
method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/")
method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log")
@@ -157,6 +143,4 @@ print = (cat, "Logging to ", (cfg.logfile))
log.open_file = "log", (cfg.logfile)
log.add_output = "info", "log"
#log.add_output = "tracker_debug", "log"
### END of rtorrent.rc ###
```