Merge pull request #191 from gcarq/feature/add-systemd-service-file

add systemd service file
This commit is contained in:
Janne Sinivirta 2017-12-17 07:43:20 +02:00 committed by GitHub
commit 155ed4e501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -138,6 +138,14 @@ $ docker start freqtrade
You do not need to rebuild the image for configuration
changes, it will suffice to edit `config.json` and restart the container.
#### systemd service file
Copy `./freqtrade.service` to your systemd user directory (usually `~/.config/systemd/user`)
and update `WorkingDirectory` and `ExecStart` to match your setup.
After that you can start the daemon with:
```bash
$ systemctl --user start freqtrade
```
### Usage
```
usage: main.py [-h] [-c PATH] [-v] [--version] [--dynamic-whitelist [INT]]

14
freqtrade.service Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=Freqtrade Daemon
After=network.target
[Service]
# Set WorkingDirectory and ExecStart to your file paths accordingly
# NOTE: %h will be resolved to /home/<username>
WorkingDirectory=%h/freqtrade
ExecStart=/usr/bin/freqtrade --dynamic-whitelist 40
Restart=on-failure
[Install]
WantedBy=default.target