Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
update README and quickins
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Jul 19, 2021
1 parent 5a13a8e commit 623bee9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,23 @@ Also:

See [the latest release](https://github.com/boypt/cloud-torrent/releases/latest) or use the oneline script to do a quick install on modern Linux.

```
``` bash
bash <(wget -qO- https://raw.githubusercontent.com/boypt/simple-torrent/master/scripts/quickinstall.sh)
```

The script install a systemd unit (under `scripts/cloud-torrent.service`) as service. Read further intructions: [Auth And Security](https://github.com/boypt/simple-torrent/wiki/AuthSecurity)

If hope to install certent version, just append a version number to the command.

``` bash
bash <(wget -qO- https://raw.githubusercontent.com/boypt/simple-torrent/master/scripts/quickinstall.sh) 1.3.2
```

## Docker [![Docker Pulls](https://img.shields.io/docker/pulls/boypt/cloud-torrent.svg)][dockerhub]

[dockerhub]: https://hub.docker.com/r/boypt/cloud-torrent/

``` sh
``` bash
$ docker run -d -p 3000:3000 -v /path/to/my/downloads:/downloads -v /path/to/my/torrents:/torrents boypt/cloud-torrent
```
When running as a container, keep in mind:
Expand All @@ -57,7 +63,7 @@ It's more practical to run docker-compose, see Wiki Page: [DockerCompose](https:
## Source

**Requirement**
- Latest [Golang](https://golang.org/dl/) (Go 1.13+)
- Latest [Golang](https://golang.org/dl/) (Go 1.16+)

``` sh
$ git clone https://github.com/boypt/simple-torrent.git
Expand Down
10 changes: 8 additions & 2 deletions scripts/quickinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ if [[ x${NEEDAUTH^^} == x"Y" ]]; then
fi

systemctl stop cloud-torrent || true
wget -qO- $GHAPI | grep browser_download_url | grep "$BINTAG" | cut -d '"' -f 4 \
| wget --no-verbose -i- -O- | gzip -d -c > ${CLDBIN}
BINURL=$(wget -qO- $GHAPI | grep browser_download_url | grep "$BINTAG" | cut -d '"' -f 4 | head -n1|| true)
if [[ -z $BINURL ]]; then
echo "It's seems that $VERSION is not a valid version, check release page:"
echo "https://github.com/boypt/simple-torrent/releases"
exit 1
fi

echo $BINURL | wget --no-verbose -i- -O- | gzip -d -c > ${CLDBIN}
chmod 0755 ${CLDBIN}

wget -O /etc/systemd/system/cloud-torrent.service https://raw.githubusercontent.com/boypt/simple-torrent/master/scripts/cloud-torrent.service
Expand Down

0 comments on commit 623bee9

Please sign in to comment.