├── .dockerignore ├── .github └── workflows │ └── build_image.yml ├── Dockerfile ├── Jenkinsfile ├── README.md ├── VERSION ├── docker-compose.yml └── root ├── defaults ├── .htpasswd ├── autodl.cfg ├── conf.d │ ├── basic.conf │ └── ssl.conf ├── conf.php ├── config.ini ├── config.irssi ├── nginx.conf ├── nginx_ssl.conf ├── rtorrent.rc ├── rtorrent.rc.pyroscope └── rutorrent-conf │ └── config.php ├── etc ├── cont-init.d │ ├── 10-wait-for-network │ ├── 20-config │ ├── 30-getautodl │ ├── 40-ssl │ ├── 50-setconf │ └── 60-pyroscope ├── logrotate.d │ └── nginx ├── php7 │ └── php-fpm.d │ │ └── rutorrent.conf └── services.d │ ├── cron │ └── run │ ├── fpm │ └── run │ ├── irssi │ └── run │ ├── nginx │ └── run │ ├── rtelegram │ └── run │ └── rutorrent │ └── run └── usr └── share └── webapps └── rutorrent └── plugins ├── filemanager └── conf.php ├── showip └── init.php └── theme └── conf.php /.dockerignore: -------------------------------------------------------------------------------- 1 | /lost+found -------------------------------------------------------------------------------- /.github/workflows/build_image.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'master' 7 | - 'develop' 8 | 9 | jobs: 10 | docker-build-image: 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 1200 13 | steps: 14 | - name: Checkout Repository 15 | uses: actions/checkout@v2 16 | - name: Set variables 17 | run: | 18 | VER=$(cat VERSION) 19 | echo "VERSION=$VER" >> $GITHUB_ENV 20 | echo "USER=romancin" >> $GITHUB_ENV 21 | echo "REPO=rutorrent" >> $GITHUB_ENV 22 | working-directory: ./ 23 | - name: Set up QEMU 24 | uses: docker/setup-qemu-action@v1 25 | with: 26 | platforms: all 27 | - name: Set up Docker Buildx 28 | uses: docker/setup-buildx-action@v1 29 | - name: Login to DockerHub 30 | uses: docker/login-action@v1 31 | with: 32 | username: ${{ secrets.DOCKERHUB_USERNAME }} 33 | password: ${{ secrets.DOCKERHUB_TOKEN }} 34 | - name: Build Docker Image (master branch) 35 | uses: docker/build-push-action@v2 36 | with: 37 | context: . 38 | file: ./Dockerfile 39 | platforms: linux/amd64,linux/aarch64 40 | push: true 41 | tags: | 42 | ${{ env.USER }}/${{ env.REPO }}:0.9.8-${{ env.VERSION }} 43 | ${{ env.USER }}/${{ env.REPO }}:latest 44 | build-args: | 45 | BASEIMAGE_VERSION=3.14 46 | RTORRENT_VER=v0.9.8 47 | LIBTORRENT_VER=v0.13.8 48 | MAXMIND_LICENSE_KEY=${{ secrets.MAXMIND_LICENSE_KEY }} 49 | if: github.ref == 'refs/heads/master' 50 | - name: Build Docker Image (develop branch) 51 | uses: docker/build-push-action@v2 52 | with: 53 | context: . 54 | file: ./Dockerfile 55 | platforms: linux/amd64,linux/aarch64 56 | push: true 57 | tags: | 58 | ${{ env.USER }}/${{ env.REPO }}:develop-${{ env.VERSION }} 59 | ${{ env.USER }}/${{ env.REPO }}:develop 60 | build-args: | 61 | BASEIMAGE_VERSION=3.14 62 | RTORRENT_VER=v0.9.8 63 | LIBTORRENT_VER=v0.13.8 64 | MAXMIND_LICENSE_KEY=${{ secrets.MAXMIND_LICENSE_KEY }} 65 | if: github.ref == 'refs/heads/develop' 66 | 67 | update-docherhub-readme: 68 | runs-on: ubuntu-latest 69 | needs: docker-build-image 70 | if: success() && github.ref == 'refs/heads/master' 71 | steps: 72 | - name: Checkout Repository 73 | uses: actions/checkout@v2 74 | - name: Set variables 75 | run: | 76 | echo "USER=romancin" >> $GITHUB_ENV 77 | echo "REPO=rutorrent" >> $GITHUB_ENV 78 | working-directory: ./ 79 | - name: Update Docker Hub README 80 | uses: peter-evans/dockerhub-description@v2 81 | with: 82 | username: ${{ secrets.DOCKERHUB_USERNAME }} 83 | password: ${{ secrets.DOCKERHUB_PASSWORD }} 84 | repository: ${{ env.USER }}/${{ env.REPO }} 85 | #short-description: ${{ github.event.repository.description }} 86 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASEIMAGE_VERSION 2 | FROM lsiobase/alpine:$BASEIMAGE_VERSION 3 | 4 | MAINTAINER romancin 5 | 6 | # set version label 7 | ARG BUILD_DATE 8 | ARG VERSION 9 | ARG BUILD_CORES 10 | ARG TARGETARCH 11 | LABEL build_version="Romancin version:- ${VERSION} Build-date:- ${BUILD_DATE}" 12 | 13 | # package version 14 | ARG MEDIAINF_VER="21.03" 15 | ARG CURL_VER="7.82.0" 16 | ARG GEOIP_VER="1.1.1" 17 | ARG RTORRENT_VER 18 | ARG LIBTORRENT_VER 19 | ARG MAXMIND_LICENSE_KEY 20 | 21 | # set env 22 | ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 23 | ENV LD_LIBRARY_PATH=/usr/local/lib 24 | ENV CONTEXT_PATH=/ 25 | ENV CREATE_SUBDIR_BY_TRACKERS="no" 26 | ENV SSL_ENABLED="no" 27 | ENV WAIT_NETWORK="no" 28 | ENV ENABLE_PYROSCOPE="no" 29 | 30 | # run commands 31 | RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} && \ 32 | apk add --no-cache \ 33 | bash-completion \ 34 | ca-certificates \ 35 | fcgi \ 36 | ffmpeg \ 37 | geoip \ 38 | geoip-dev \ 39 | gzip \ 40 | logrotate \ 41 | nginx \ 42 | dtach \ 43 | tar \ 44 | unrar \ 45 | unzip \ 46 | p7zip \ 47 | sox \ 48 | wget \ 49 | irssi \ 50 | irssi-perl \ 51 | zlib \ 52 | zlib-dev \ 53 | libxml2-dev \ 54 | perl-archive-zip \ 55 | perl-net-ssleay \ 56 | perl-digest-sha1 \ 57 | git \ 58 | libressl \ 59 | binutils \ 60 | findutils \ 61 | zip \ 62 | php7 \ 63 | php7-cgi \ 64 | php7-fpm \ 65 | php7-json \ 66 | php7-mbstring \ 67 | php7-sockets \ 68 | php7-pear \ 69 | php7-opcache \ 70 | php7-apcu \ 71 | php7-ctype \ 72 | php7-dev \ 73 | php7-phar \ 74 | php7-zip \ 75 | php7-openssl \ 76 | php7-bcmath \ 77 | php7-session \ 78 | php7-curl \ 79 | python2 \ 80 | python3 \ 81 | py3-pip && \ 82 | # install build packages 83 | apk add --no-cache --virtual=build-dependencies \ 84 | autoconf \ 85 | automake \ 86 | cppunit-dev \ 87 | perl-dev \ 88 | file \ 89 | g++ \ 90 | gcc \ 91 | libtool \ 92 | make \ 93 | ncurses-dev \ 94 | build-base \ 95 | libtool \ 96 | subversion \ 97 | linux-headers \ 98 | curl-dev \ 99 | libressl-dev \ 100 | libffi-dev \ 101 | python3-dev \ 102 | go \ 103 | musl-dev && \ 104 | # compile curl to fix ssl for rtorrent 105 | cd /tmp && \ 106 | mkdir curl && \ 107 | cd curl && \ 108 | wget -qO- https://curl.haxx.se/download/curl-${CURL_VER}.tar.gz | tar xz --strip 1 && \ 109 | ./configure --with-ssl && make -j ${NB_CORES} && make install && \ 110 | ldconfig /usr/bin && ldconfig /usr/lib && \ 111 | # install webui 112 | mkdir -p \ 113 | /usr/share/webapps/rutorrent \ 114 | /defaults/rutorrent-conf && \ 115 | git clone --depth 1 https://github.com/Novik/ruTorrent.git \ 116 | /usr/share/webapps/rutorrent/ && \ 117 | mv /usr/share/webapps/rutorrent/conf/* \ 118 | /defaults/rutorrent-conf/ && \ 119 | rm -rf \ 120 | /defaults/rutorrent-conf/users && \ 121 | pip3 install --no-cache-dir CfScrape \ 122 | cloudscraper && \ 123 | # install webui extras 124 | # QuickBox Theme 125 | git clone --depth 1 https://github.com/QuickBox/club-QuickBox /usr/share/webapps/rutorrent/plugins/theme/themes/club-QuickBox && \ 126 | git clone --depth 1 https://github.com/Phlooo/ruTorrent-MaterialDesign /usr/share/webapps/rutorrent/plugins/theme/themes/MaterialDesign && \ 127 | git clone --depth 1 https://github.com/Teal-c/rtModern-Remix.git /usr/share/webapps/rutorrent/plugins/theme/themes/rtModern-Remix && \ 128 | 129 | # ruTorrent plugins 130 | cd /usr/share/webapps/rutorrent/plugins/ && \ 131 | git clone --depth 1 https://github.com/orobardet/rutorrent-force_save_session force_save_session && \ 132 | git clone --depth 1 https://github.com/AceP1983/ruTorrent-plugins && \ 133 | mv ruTorrent-plugins/* . && \ 134 | rm -rf ruTorrent-plugins && \ 135 | apk add --no-cache cksfv && \ 136 | mkdir "filemanager" && \ 137 | curl https://codeload.github.com/nelu/rutorrent-filemanager/tar.gz/master | tar -xzf - --overwrite-dir --strip-components=1 -C "filemanager" && \ 138 | mkdir "filemanager-share" && \ 139 | curl https://codeload.github.com/nelu/rutorrent-filemanager-share/tar.gz/master | tar -xzf - --overwrite-dir --strip-components=1 -C "filemanager-share" && \ 140 | mkdir "filemanager-media" && \ 141 | curl https://codeload.github.com/nelu/rutorrent-filemanager-media/tar.gz/master | tar -xzf - --overwrite-dir --strip-components=1 -C "filemanager-media" && \ 142 | chmod 775 -R "/usr/share/webapps/rutorrent/plugins/" && \ 143 | cd /usr/share/webapps/rutorrent/ && \ 144 | cd /tmp && \ 145 | git clone --depth 1 https://github.com/mcrapet/plowshare.git && \ 146 | cd plowshare/ && \ 147 | make install && \ 148 | cd .. && \ 149 | rm -rf plowshare* && \ 150 | apk add --no-cache unzip bzip2 && \ 151 | cd /usr/share/webapps/rutorrent/plugins/ && \ 152 | git clone --depth 1 https://github.com/Gyran/rutorrent-pausewebui pausewebui && \ 153 | git clone --depth 1 https://github.com/Gyran/rutorrent-ratiocolor ratiocolor && \ 154 | sed -i 's/changeWhat = "cell-background";/changeWhat = "font";/g' /usr/share/webapps/rutorrent/plugins/ratiocolor/init.js && \ 155 | git clone --depth 1 https://github.com/Micdu70/rutorrent-instantsearch instantsearch && \ 156 | git clone --depth 1 https://github.com/xombiemp/rutorrentMobile mobile && \ 157 | rm -rf ipad && \ 158 | git clone --depth 1 https://github.com/Micdu70/rutorrent-addzip addzip && \ 159 | git clone https://github.com/stickz/rutorrent-discord && \ 160 | cd rutorrent-discord && \ 161 | git checkout ruTorrentFixes && \ 162 | cd .. && \ 163 | mv rutorrent-discord/* . && \ 164 | rm -rf rutorrent-discord && \ 165 | git clone --depth 1 https://github.com/Micdu70/geoip2-rutorrent geoip2 && \ 166 | rm -rf geoip && \ 167 | mkdir -p /usr/share/GeoIP && \ 168 | cd /usr/share/GeoIP && \ 169 | wget -O GeoLite2-City.tar.gz "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" && \ 170 | wget -O GeoLite2-Country.tar.gz "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$MAXMIND_LICENSE_KEY&suffix=tar.gz" && \ 171 | tar xzf GeoLite2-City.tar.gz && \ 172 | tar xzf GeoLite2-Country.tar.gz && \ 173 | rm -f *.tar.gz && \ 174 | mv GeoLite2-*/*.mmdb . && \ 175 | cp *.mmdb /usr/share/webapps/rutorrent/plugins/geoip2/database/ && \ 176 | pecl install geoip-${GEOIP_VER} && \ 177 | chmod +x /usr/lib/php7/modules/geoip.so && \ 178 | echo ";extension=geoip.so" >> /etc/php7/php.ini && \ 179 | # install autodl-irssi perl modules 180 | perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit' && \ 181 | curl -L http://cpanmin.us | perl - App::cpanminus && \ 182 | cpanm HTML::Entities XML::LibXML JSON JSON::XS && \ 183 | # compile xmlrpc-c 184 | cd /tmp && \ 185 | git clone --depth 1 https://github.com/mirror/xmlrpc-c.git && \ 186 | cd /tmp/xmlrpc-c/stable && \ 187 | ./configure --build=${TARGETARCH}-unknown-linux-gnu --with-libwww-ssl --disable-wininet-client --disable-curl-client --disable-libwww-client --disable-abyss-server --disable-cgi-server && make -j ${NB_CORES} && make install && \ 188 | # compile libtorrent 189 | if [ "$RTORRENT_VER" == "v0.9.4" ] || [ "$RTORRENT_VER" == "v0.9.6" ]; then apk add -X http://dl-cdn.alpinelinux.org/alpine/v3.6/main -U cppunit-dev==1.13.2-r1 cppunit==1.13.2-r1; fi && \ 190 | cd /tmp && \ 191 | mkdir libtorrent && \ 192 | cd libtorrent && \ 193 | wget -qO- https://github.com/rakshasa/libtorrent/archive/${LIBTORRENT_VER}.tar.gz | tar xz --strip 1 && \ 194 | ./autogen.sh && ./configure && make -j ${NB_CORES} && make install && \ 195 | # compile rtorrent 196 | cd /tmp && \ 197 | mkdir rtorrent && \ 198 | cd rtorrent && \ 199 | wget -qO- https://github.com/rakshasa/rtorrent/archive/${RTORRENT_VER}.tar.gz | tar xz --strip 1 && \ 200 | ./autogen.sh && ./configure --with-xmlrpc-c && make -j ${NB_CORES} && make install && \ 201 | # compile mediainfo packages 202 | curl -o \ 203 | /tmp/libmediainfo.tar.gz -L \ 204 | "http://mediaarea.net/download/binary/libmediainfo0/${MEDIAINF_VER}/MediaInfo_DLL_${MEDIAINF_VER}_GNU_FromSource.tar.gz" && \ 205 | curl -o \ 206 | /tmp/mediainfo.tar.gz -L \ 207 | "http://mediaarea.net/download/binary/mediainfo/${MEDIAINF_VER}/MediaInfo_CLI_${MEDIAINF_VER}_GNU_FromSource.tar.gz" && \ 208 | mkdir -p \ 209 | /tmp/libmediainfo \ 210 | /tmp/mediainfo && \ 211 | tar xf /tmp/libmediainfo.tar.gz -C \ 212 | /tmp/libmediainfo --strip-components=1 && \ 213 | tar xf /tmp/mediainfo.tar.gz -C \ 214 | /tmp/mediainfo --strip-components=1 && \ 215 | cd /tmp/libmediainfo && \ 216 | ./SO_Compile.sh && \ 217 | cd /tmp/libmediainfo/ZenLib/Project/GNU/Library && \ 218 | make install && \ 219 | cd /tmp/libmediainfo/MediaInfoLib/Project/GNU/Library && \ 220 | make install && \ 221 | cd /tmp/mediainfo && \ 222 | ./CLI_Compile.sh && \ 223 | cd /tmp/mediainfo/MediaInfo/Project/GNU/CLI && \ 224 | make install && \ 225 | # compile and install rtelegram 226 | GOPATH=/usr go get -u github.com/pyed/rtelegram && \ 227 | # create libressl link to openssl for old alpine images 228 | if [ "$RTORRENT_VER" == "v0.9.4" ] || [ "$RTORRENT_VER" == "v0.9.6" ] || [ "$RTORRENT_VER" == "v0.9.7" ]; then ln -s /usr/bin/openssl /usr/bin/libressl; fi && \ 229 | # cleanup 230 | apk del --purge \ 231 | build-dependencies && \ 232 | if [ "$RTORRENT_VER" == "v0.9.4" ] || [ "$RTORRENT_VER" == "v0.9.6" ]; then apk del -X http://dl-cdn.alpinelinux.org/alpine/v3.6/main cppunit-dev; fi && \ 233 | rm -rf \ 234 | /tmp/* 235 | 236 | # add local files 237 | COPY root/ / 238 | COPY VERSION / 239 | 240 | # ports and volumes 241 | EXPOSE 443 51415 242 | VOLUME /config /downloads 243 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | environment { 3 | registry = "romancin/rutorrent" 4 | repository = "rutorrent" 5 | withCredentials = 'dockerhub' 6 | registryCredential = 'dockerhub' 7 | MAXMIND_LICENSE_KEY = credentials('maxmind-license-key') 8 | } 9 | agent any 10 | stages { 11 | stage('Prepare Jenkins worker') { 12 | steps { 13 | sh 'apt update && apt install -y docker.io' 14 | } 15 | } 16 | stage('Cloning Git Repository') { 17 | steps { 18 | git url: 'https://github.com/romancin/rutorrent-docker.git', 19 | branch: '$BRANCH_NAME' 20 | } 21 | } 22 | stage('Building image and pushing it to the registry (develop)') { 23 | when{ 24 | branch 'develop' 25 | } 26 | steps { 27 | script { 28 | def gitbranch = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() 29 | def version = readFile('VERSION') 30 | def versions = version.split('\\.') 31 | def base = gitbranch 32 | def major = gitbranch + '-' + versions[0] 33 | def minor = gitbranch + '-' + versions[0] + '.' + versions[1] 34 | def patch = gitbranch + '-' + version.trim() 35 | docker.withRegistry('', registryCredential) { 36 | def image = docker.build("$registry:$gitbranch", "--build-arg BASEIMAGE_VERSION=3.14 --build-arg RTORRENT_VER=v0.9.8 --build-arg LIBTORRENT_VER=v0.13.8 --build-arg MAXMIND_LICENSE_KEY=${MAXMIND_LICENSE_KEY} --build-arg TARGETARCH=amd64 --network=host -f Dockerfile .") 37 | image.push() 38 | image.push(base) 39 | image.push(major) 40 | image.push(minor) 41 | image.push(patch) 42 | } 43 | } 44 | } 45 | } 46 | stage('Building image and pushing it to the registry (master)') { 47 | when{ 48 | branch 'master' 49 | } 50 | steps { 51 | script { 52 | def version = readFile('VERSION') 53 | def versions = version.split('\\.') 54 | def base = '0.9.8' 55 | def major = '0.9.8-' + versions[0] 56 | def minor = '0.9.8-' + versions[0] + '.' + versions[1] 57 | def patch = '0.9.8-' + version.trim() 58 | docker.withRegistry('', registryCredential) { 59 | def image = docker.build("$registry:latest", "--build-arg BASEIMAGE_VERSION=3.14 --build-arg RTORRENT_VER=v0.9.8 --build-arg LIBTORRENT_VER=v0.13.8 --build-arg MAXMIND_LICENSE_KEY=${MAXMIND_LICENSE_KEY} --build-arg TARGETARCH=amd64 --network=host -f Dockerfile .") 60 | image.push() 61 | image.push(base) 62 | image.push(major) 63 | image.push(minor) 64 | image.push(patch) 65 | } 66 | } 67 | script { 68 | withCredentials([usernamePassword(credentialsId: 'dockerhub', passwordVariable: 'DOCKERHUB_PASSWORD', usernameVariable: 'DOCKERHUB_USERNAME')]) { 69 | docker.image('sheogorath/readme-to-dockerhub').run('-v $PWD:/data -e DOCKERHUB_USERNAME=$DOCKERHUB_USERNAME -e DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD -e DOCKERHUB_REPO_NAME=$repository') 70 | } 71 | } 72 | } 73 | } 74 | } 75 | post { 76 | success { 77 | telegramSend(message: '[Jenkins] - Pipeline CI-rutorrent-docker $BUILD_URL finalizado con estado :: $BUILD_STATUS', chatId: -395961814) 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rutorrent-docker 2 | 3 | A repository for creating a docker container including rtorrent with rutorrent. 4 | 5 | ![docker pulls](https://img.shields.io/docker/pulls/romancin/rutorrent.svg) ![docker stars](https://img.shields.io/docker/stars/romancin/rutorrent.svg) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X2CT2SWQCP74U) 6 | 7 | Latest version: 8 | 9 | ![Docker Image Version (latest semver)](https://img.shields.io/docker/v/romancin/rutorrent/0.9.8) ![docker size](https://img.shields.io/docker/image-size/romancin/rutorrent/0.9.8) 10 | 11 | You can invite me a beer if you want ;) 12 | 13 | ## Description 14 | 15 | This is a completely funcional Docker image with rutorrent, rtorrent, libtorrent and a lot of plugins 16 | for rutorrent, like autodl-irssi, filemanager, fileshare and other useful ones. 17 | 18 | Based on Alpine Linux, which provides a very small size. 19 | 20 | Includes plugins: logoff fileshare filemanager pausewebui mobile ratiocolor force_save_session showip ... 21 | 22 | Also installed and selected by default this awesome theme: club-QuickBox 23 | 24 | Also includes MaterialDesign theme as an option. 25 | 26 | You need to run pyrocore commands with user "abc", which is who runs rtorrent, so use "su - abc" after connecting container before using pyrocore commands. If you already have torrents in your rtorrent docker instance, you have to add extra information before using pyrocore, check here: http://pyrocore.readthedocs.io/en/latest/setup.html in the "Adding Missing Data to Your rTorrent Session" topic. 27 | 28 | rTelegram is added, that will allow you to control your rtorrent instance from Telegram client. 29 | 30 | Tested and working on Synology and QNAP, but should work on any x86_64 devices. 31 | 32 | ## Instructions 33 | 34 | - Map any local port to 80 for rutorrent access (Default username/password is admin/admin) 35 | - Map any local port to 443 for SSL rutorrent access if SSL_ENABLED=yes (Default username/password is admin/admin) 36 | - Map any local port to 51415 for rtorrent 37 | - Map a local volume to /config (Stores configuration data, including rtorrent session directory. Consider this on SSD Disk) 38 | - Map a local volume to /downloads (Stores downloaded torrents) 39 | 40 | In order to change rutorrent web access password execute this inside container: 41 | - `sh -c "echo -n 'admin:' > /config/nginx/.htpasswd"` 42 | - `sh -c "libressl passwd -apr1 >> /config/nginx/.htpasswd"` 43 | 44 | **IMPORTANT** 45 | - Old rtorrent versions are now deprecated since version 4.2.0 of the image. The older ones should remain available for use until docker hub deletes them. 46 | - Since v1.0.0 version, rtorrent.rc file has changed completely, so rename it before starting with the new image the first time. After first run, add the changes you need to this config file. It is on /rtorrent directory. 47 | - Since v2.0.0 version, config.php of rutorrent has added new utilities, so rename it before starting with the new image the first time. After first run, add the changes you need to this config file. It is on /rutorrent/settings directory. 48 | 49 | ## Sample run command 50 | 51 | For rtorrent 0.9.8 version: 52 | 53 | ```bash 54 | docker run -d --name=rutorrent \ 55 | -v /share/Container/rutorrent/config:/config \ 56 | -v /share/Container/rutorrent/downloads:/downloads \ 57 | -e PGID=0 -e PUID=0 -e TZ=Europe/Madrid \ 58 | -p 9443:443 \ 59 | -p 51415-51415:51415-51415 \ 60 | romancin/rutorrent:latest 61 | ``` 62 | 63 | For rtorrent 0.9.7 version **DEPRECATED**: 64 | 65 | ```bash 66 | docker run -d --name=rutorrent \ 67 | -v /share/Container/rutorrent/config:/config \ 68 | -v /share/Container/rutorrent/downloads:/downloads \ 69 | -e PGID=0 -e PUID=0 -e TZ=Europe/Madrid \ 70 | -p 9443:443 \ 71 | -p 51415-51415:51415-51415 \ 72 | romancin/rutorrent:0.9.7 73 | ``` 74 | 75 | For rtorrent 0.9.6 version **DEPRECATED**: 76 | 77 | ```bash 78 | docker run -d --name=rutorrent \ 79 | -v /share/Container/rutorrent/config:/config \ 80 | -v /share/Container/rutorrent/downloads:/downloads \ 81 | -e PGID=0 -e PUID=0 -e TZ=Europe/Madrid \ 82 | -p 9443:443 \ 83 | -p 51415-51415:51415-51415 \ 84 | romancin/rutorrent:0.9.6 85 | ``` 86 | 87 | For rtorrent 0.9.4 version **DEPRECATED**: 88 | 89 | ```bash 90 | docker run -d --name=rutorrent \ 91 | -v /share/Container/rutorrent/config:/config \ 92 | -v /share/Container/rutorrent/downloads:/downloads \ 93 | -e PGID=0 -e PUID=0 -e TZ=Europe/Madrid \ 94 | -p 9443:443 \ 95 | -p 51415-51415:51415-51415 \ 96 | romancin/rutorrent:0.9.4 97 | ``` 98 | 99 | Remember editing `/config/rtorrent/rtorrent.rc` with your own settings, especially your watch subfolder configuration. 100 | 101 | ## Environment variables supported 102 | 103 | | Variable | Function | 104 | | :----: | --- | 105 | | `-e PUID=1000` | for UserID - see below for explanation | 106 | | `-e PGID=1000` | for GroupID - see below for explanation | 107 | | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. | 108 | | `-e CREATE_SUBDIR_BY_TRACKERS=YES` | YES to create downloads/watch subfolder for trackers (OLD BEHAVIOUR) or NO to create only completed/watch folder (DEFAULT) | 109 | | `-e SSL_ENABLED=YES` | YES to enable SSL in nginx/flood or NO to not use it (DEFAULT) | 110 | | `-e ENABLE_PYROSCOPE=YES` | YES to enable pyroscope installation or NO to not use it (DEFAULT, as currently pyroscope installation is broken) | 111 | | `-e WAIT_NETWORK=YES` | YES to wait until network is available (Needed for TrueNAS kubernetes static IP address to work) or NO to not use it (DEFAULT) | 112 | | `-e RT_TOKEN=your_bot_token` | for your Telegram BOT Token - [see rtelegram documentation for instructions](https://github.com/pyed/rtelegram/wiki/Getting-started). If not used, rtelegram won't start on boot. | 113 | | `-e RT_MASTERS=your_real_telegram_username` | for your Telegram real username - [see rtelegram documentation for instructions](https://github.com/pyed/rtelegram/wiki/Getting-started). If not used, rtelegram won't start on boot. | 114 | 115 | ## User / Group Identifiers 116 | 117 | When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. 118 | 119 | Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. 120 | 121 | In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below: 122 | 123 | ``` 124 | $ id username 125 | uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) 126 | ``` 127 | 128 | ## Changelog 129 | v7.0.0 (21/03/2022): Implement pyroscope installation optionally (current pyrocore installation scripts do not work, so don't use it, and the project seems unmaintained :() and a new option to wait for network to be ready. **NOTE**: Important changes made in rutorrent [#2236](https://github.com/Novik/ruTorrent/pull/2236) and [#2247](https://github.com/Novik/ruTorrent/pull/2247) broke compatibility with v3.10 for some themes and plugins. For the moment, I am using certain forks from [stickz](https://github.com/stickz) (Thank you very much!) to fix certain plugins. 130 | 131 | v6.0.0 (31/07/2021): Updated base image to Alpine 3.14 and applications to current versions. 132 | 133 | v5.0.1 (07/11/2020): Disabled rar in filemanager plugin because it is not available in Alpine. 134 | 135 | v5.0.0 (07/11/2020): Now old rtorrent versions are deprecated and the image updated to Alpine 3.12. 136 | 137 | v4.2.0 (05/11/2020): Added Discord plugin installation, changed XMLRCP-C repository to the mirror in Github and change Flood to currently most active fork. Fixed PluginCheckPort plugin. You will no longer see 'Bad response from server: (500 [error,initportcheck])' error message in ruTorrent. 138 | 139 | v4.0.4 (04/07/2020): Update image to Alpine 3.11 and current packages 140 | 141 | v4.0.3 (24/05/2020): Update image to current packages 142 | 143 | v4.0.2 (31/03/2020): Corrected rutorrentMobile plugin installation (Thanks @jorritsmit!!) 144 | 145 | v4.0.0 (16/03/2020): Added variable for optional SSL configuration. 146 | 147 | v3.0.0 (13/03/2020): Updated to Alpine 3.11 (rtorrent 0.9.8 only). Changed to new maxmind database. 148 | 149 | v2.2.1 (20/09/2019): Unified Dockerfile and Jenkinsfile for easier image code management 150 | 151 | v2.2.0 (09/09/2019): Added [rtelegram](https://github.com/pyed/rtelegram). It allows to control rtorrent from Telegram. 152 | 153 | v2.1.0 (10/08/2019): Fixed cloudflare plugin. New 0.9.7 branch. Master branch updated to rtorrent/libtorrent 0.9.8/0.13.8. 154 | 155 | v2.0.1 (29/04/2019): Added GeoIP2 plugin. 156 | 157 | v2.0 (28/04/2019): Updated image to rutorrent 3.9. For the first time, I have eliminated the creation of subfolder directories for trackers by default. Since this moment, you can choose to create them using CREATE_SUBDIR_BY_TRACKERS variable. 158 | 159 | v1.0.1 (28/03/2019): curl 7.64.0 version has an issue that causes very high CPU usage in rtorrent. This version should fix this behaviour. 160 | 161 | v1.0.0 (16/03/2019): NEW: rTorrent 0.9.7 / libtorrent 0.13.7 version. rtorrent.rc file has changed completely, rename it before starting with the new image the first time. After first run, add the changes you need to this config file. 162 | 163 | vN/A: 05/08/2018: NEW: Includes Pyrocore/rtcontrol - http://pyrocore.readthedocs.io/en/latest/index.html 164 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | v7.0.1 2 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | rutorrent: 4 | image: romancin/rutorrent:0.9.8 5 | container_name: rutorrent 6 | networks: 7 | - default 8 | tty: true 9 | volumes: 10 | - /share/Container/rutorrent:/config 11 | - /share/Container/rutorrent/downloads:/downloads 12 | environment: 13 | - PUID=0 14 | - PGID=0 15 | - TZ=Europe/Madrid 16 | - CREATE_SUBDIR_BY_TRACKERS=NO 17 | - SSL_ENABLED=NO 18 | - RT_TOKEN= 19 | - RT_MASTERS= 20 | ports: 21 | - "8080:80" 22 | #- "7443:443" 23 | - "32316:52316" 24 | -------------------------------------------------------------------------------- /root/defaults/.htpasswd: -------------------------------------------------------------------------------- 1 | admin:$apr1$K8mxMSta$1IejuSi4FSMkySGdDIyxd/ 2 | -------------------------------------------------------------------------------- /root/defaults/autodl.cfg: -------------------------------------------------------------------------------- 1 | [options] 2 | rt-address = /run/php/.rtorrent.sock 3 | gui-server-port = 51499 4 | gui-server-password = password 5 | -------------------------------------------------------------------------------- /root/defaults/conf.d/basic.conf: -------------------------------------------------------------------------------- 1 | # hide nginx version 2 | server_tokens off; 3 | 4 | # add nosniff header (https://www.owasp.org/index.php/List_of_useful_HTTP_headers) 5 | add_header X-Content-Type-Options nosniff; 6 | -------------------------------------------------------------------------------- /root/defaults/conf.d/ssl.conf: -------------------------------------------------------------------------------- 1 | # Getting a high secure SSL configured system 2 | 3 | # Tutorials used: 4 | # https://scotthelme.co.uk/a-plus-rating-qualys-ssl-test/ 5 | # http://www.howtoforge.com/ssl-perfect-forward-secrecy-in-nginx-webserver 6 | 7 | # enable dh 8 | ssl_dhparam /config/nginx/dh.pem; 9 | 10 | # protocols 11 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # disable poodle 12 | 13 | # ciphers 14 | ssl_prefer_server_ciphers on; 15 | ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; 16 | 17 | # HSTS 18 | add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; 19 | 20 | # certs 21 | ssl_certificate /config/nginx/cert.pem; 22 | ssl_certificate_key /config/nginx/key.pem; 23 | -------------------------------------------------------------------------------- /root/defaults/conf.php: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /root/defaults/config.ini: -------------------------------------------------------------------------------- 1 | # The default PyroScope configuration file 2 | # 3 | # For details, see https://pyrocore.readthedocs.io/en/latest/setup.html 4 | # 5 | 6 | [GLOBAL] 7 | # Location of the Python configuration script 8 | config_script = %(config_dir)s/config.py 9 | 10 | # Which torrent engine to use (currently, only rTorrent) 11 | engine = pyrocore.torrent.rtorrent:RtorrentEngine 12 | 13 | # Location of your rtorrent configuration 14 | rtorrent_rc = /config/rtorrent/rtorrent.rc 15 | 16 | # Use query optimizer? (needs rtorrent-ps 1.1+ or rtorrent 0.9.7+) 17 | fast_query = 0 18 | 19 | # Glob patterns of superfluous files that can be safely deleted when data files are removed 20 | waif_pattern_list = *~ *.swp 21 | 22 | # How often to repeat headers when --column-headers is used 23 | output_header_frequency = 30 24 | 25 | # Bright yellow headers on a terminal 26 | output_header_ecma48 = \x1B[1m\x1B[33m 27 | 28 | # The default sort order 29 | sort_fields = name,alias 30 | 31 | # A list of callables that get called AFTER config is successfully loaded 32 | config_validator_callbacks = pyrocore.torrent.engine:TorrentProxy.add_custom_fields 33 | 34 | # A list of callables that return an iterable of FieldDefinition objects 35 | custom_field_factories = 36 | 37 | 38 | [FORMATS] 39 | # The default output format of the result list 40 | default = \ $(name)s {$(alias)s, $(completed)s} 41 | \ $(is_private)s $(is_open)s $(is_active)s P$(prio.raw)s $(done)5.1f%% R:$(ratio)6.2f SZ:$(size.sz)s U:$(up.sz)s/s D:$(down.sz)s/s T:$(throttle)s $(message)s 42 | 43 | # The default output format for actions 44 | action = $(now.iso)16.16s $(action)8s $(name)s {$(alias)s} 45 | action_cron = $(action)s $(name)s {$(alias)s} 46 | 47 | # Custom output formats 48 | completion = $(completed.duration)13.13s $(leechtime)9.9s $(seedtime)9.9s $(is_open)4.4s $(up.sz)10s/s $(ratio.pc)5d%% $(alias)-8s $(kind_50)-4.4s $(realpath.pathbase)s 49 | short = $(completed)-16.16s $(size.sz)10s $(uploaded.sz)10s $(ratio.pc)5d%% $(alias)-8s $(name)s 50 | files = $(is_active)-6s $(completed)s $(size.sz)s $(name)s {$(alias)s} 51 | $(files)s [$(custom_kind)s]\n 52 | filelist = {{for i, x in looper(d.files)}}{{d.realpath}}/{{x.path}}{{if i.next is not None}}{{chr(10)}}{{endif}}{{endfor}} 53 | 54 | # Tempita templates 55 | colored = {{default ESC = '\x1B'}}{{d.size|sz}} {{d.uploaded|sz}} {{# 56 | }}{{if d.seedtime < 8*7*86400}}{{ESC}}[36m{{d.seedtime|duration}}{{ESC}}[0m{{else}}{{d.seedtime|duration}}{{endif}}{{# 57 | }}{{if d.ratio < 0.8}}{{ESC}}[1m{{ESC}}[31m{{elif d.ratio < 1.0}}{{ESC}}[36m{{elif type(d.ratio) is float}}{{ESC}}[32m{{endif}}{{# 58 | }} {{str(pc(d.ratio)).rjust(8)}}{{chr(37)}}{{if type(d.ratio) is float}}{{ESC}}[0m{{endif}}{{# 59 | }} {{(d.alias or '').ljust(8)}} {{d.name or ''}} 60 | 61 | # To make -color work (which is "-c -o lor") 62 | lor = %(colored)s 63 | 64 | # Formats for UI commands feedback 65 | tag_show = {{#}}Tags: {{ chr(32).join(d.tagged) }} [{{ d.name[:33] }}…] 66 | 67 | 68 | [XMLRPC] 69 | # Here you can rename / map most of the XMLRPC method names used internally; 70 | # since command names seem to be heavily in flux in SVN HEAD of rTorrent, this 71 | # gives you a chance of adapting to the version your use. Report any calls that 72 | # need mapping but are not listed here (open an issue at "Google code", and be 73 | # sure to include the version of rTorrent and pyrocore you are using). 74 | # 75 | # Currently, methods used in a multicall are NOT mapped. 76 | # 77 | # The format is "internal_name = client_name". 78 | 79 | # This is specifically to allow `proxy.log(…)` calls (`print` is a keyword) 80 | log = print 81 | 82 | [XMLRPC_0_8_7] 83 | # Like [XMLRPC], but only for the given version and up 84 | d.save_session = d.save_full_session 85 | d.multicall = d.multicall2 86 | d.get_down_rate = d.down.rate 87 | d.get_down_total = d.down.total 88 | d.get_up_rate = d.up.rate 89 | d.get_up_total = d.up.total 90 | d.get_custom = d.custom 91 | d.set_custom = d.custom.set 92 | t.get_url = t.url 93 | get_name = session.name 94 | get_session = session.path 95 | session_save = session.save 96 | get_directory = directory.default 97 | view_list = view.list 98 | view_filter = view.filter 99 | system.get_cwd = system.cwd 100 | 101 | 102 | [TRAITS_BY_ALIAS] 103 | # Assign traits to trackers with a unique theme 104 | Debian = linux 105 | jamendo.com = audio 106 | 107 | 108 | [INFLUXDB] 109 | # Config for InfluxDB, used when optional features are activated 110 | ; Base URL of the InfluxDB REST API 111 | url = http://localhost:8086/ 112 | ; Account used for pushing data 113 | user = root 114 | ; Credentials used for pushing data 115 | password = root 116 | ; Timeout for REST calls [sec] 117 | timeout = 0.250 118 | 119 | 120 | [SWEEP] 121 | # Settings for the "rtsweep" tool 122 | 123 | # Use the rules from the named [SWEEP_RULES_‹name›] sections 124 | default_rules = builtin, custom 125 | 126 | # Filter for protected items (active, prio 3, and ignored items by default) 127 | filter_protected = last_xfer<1h OR prio=3 OR is_ignored=y 128 | 129 | # Maximum amount of space that can be requested in one go 130 | space_max_request = 99g 131 | 132 | # Minimum amount of space that must be kept free (adds to the space request) 133 | space_min_free = 10g 134 | 135 | # Default sort order within each rule 136 | default_order = loaded 137 | 138 | 139 | [SWEEP_RULES_CUSTOM] 140 | # See "docs/setup.rst" for details. 141 | 142 | 143 | [SWEEP_RULES_BUILTIN] 144 | # Builtin rules, disable by changing "default_rules" 145 | 146 | # Full BD / Remux older than 7 days 147 | bluray.prio = 100 148 | bluray.filter = /BLURAY/,/Remux/ size>14g loaded>7d 149 | 150 | # Bigger items with ratio > 3 and older than 5 days 151 | seeded.prio = 200 152 | seeded.order = active,-size 153 | seeded.filter = size>3g ratio>3 loaded>5d 154 | 155 | # 1080p after 2 weeks 156 | video1080p.prio = 500 157 | video1080p.filter = /1080p/ loaded>15d 158 | 159 | # 720p after 3 weeks 160 | video720p.prio = 550 161 | video720p.filter = /720p/ loaded>22d 162 | 163 | # Bigger than 1.5G after 5 days, inactive and big items first 164 | big5d.prio = 900 165 | big5d.order = active,-size 166 | big5d.filter = size>1.5g loaded>5d 167 | 168 | 169 | [ANNOUNCE] 170 | # Add alias names for announce URLs to this section; those aliases are used 171 | # at many places, e.g. by the "mktor" tool and to shorten URLs to these aliases 172 | 173 | # Public trackers 174 | ;PBT = http://tracker.publicbt.com:80/announce 175 | ; udp://tracker.publicbt.com:80/announce 176 | ;OBT = http://tracker.openbittorrent.com:80/announce 177 | ; udp://tracker.openbittorrent.com:80/announce 178 | ;Debian = http://bttracker.debian.org:6969/announce 179 | 180 | # Private trackers 181 | ;... 182 | -------------------------------------------------------------------------------- /root/defaults/config.irssi: -------------------------------------------------------------------------------- 1 | servers = ( 2 | { address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; }, 3 | { address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; }, 4 | { address = "irc.esper.net"; chatnet = "EsperNet"; port = "6667"; }, 5 | { 6 | address = "chat.freenode.net"; 7 | chatnet = "Freenode"; 8 | port = "6667"; 9 | }, 10 | { 11 | address = "irc.gamesurge.net"; 12 | chatnet = "GameSurge"; 13 | port = "6667"; 14 | }, 15 | { address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; }, 16 | { address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; }, 17 | { 18 | address = "irc.ircsource.net"; 19 | chatnet = "IRCSource"; 20 | port = "6667"; 21 | }, 22 | { address = "irc.netfuze.net"; chatnet = "NetFuze"; port = "6667"; }, 23 | { address = "irc.oftc.net"; chatnet = "OFTC"; port = "6667"; }, 24 | { 25 | address = "irc.quakenet.org"; 26 | chatnet = "QuakeNet"; 27 | port = "6667"; 28 | }, 29 | { address = "irc.rizon.net"; chatnet = "Rizon"; port = "6667"; }, 30 | { address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; }, 31 | { 32 | address = "irc.undernet.org"; 33 | chatnet = "Undernet"; 34 | port = "6667"; 35 | } 36 | ); 37 | 38 | chatnets = { 39 | DALnet = { 40 | type = "IRC"; 41 | max_kicks = "4"; 42 | max_msgs = "20"; 43 | max_whois = "30"; 44 | }; 45 | EFNet = { 46 | type = "IRC"; 47 | max_kicks = "1"; 48 | max_msgs = "4"; 49 | max_whois = "1"; 50 | }; 51 | EsperNet = { 52 | type = "IRC"; 53 | max_kicks = "1"; 54 | max_msgs = "4"; 55 | max_whois = "1"; 56 | }; 57 | Freenode = { 58 | type = "IRC"; 59 | max_kicks = "1"; 60 | max_msgs = "4"; 61 | max_whois = "1"; 62 | }; 63 | GameSurge = { 64 | type = "IRC"; 65 | max_kicks = "1"; 66 | max_msgs = "1"; 67 | max_whois = "1"; 68 | }; 69 | IRCnet = { 70 | type = "IRC"; 71 | max_kicks = "1"; 72 | max_msgs = "1"; 73 | max_whois = "1"; 74 | }; 75 | IRCSource = { 76 | type = "IRC"; 77 | max_kicks = "1"; 78 | max_msgs = "4"; 79 | max_whois = "1"; 80 | }; 81 | NetFuze = { 82 | type = "IRC"; 83 | max_kicks = "1"; 84 | max_msgs = "1"; 85 | max_whois = "1"; 86 | }; 87 | OFTC = { type = "IRC"; max_kicks = "1"; max_msgs = "1"; max_whois = "1"; }; 88 | QuakeNet = { 89 | type = "IRC"; 90 | max_kicks = "1"; 91 | max_msgs = "1"; 92 | max_whois = "1"; 93 | }; 94 | Rizon = { 95 | type = "IRC"; 96 | max_kicks = "1"; 97 | max_msgs = "1"; 98 | max_whois = "1"; 99 | }; 100 | SILC = { type = "SILC"; }; 101 | Undernet = { 102 | type = "IRC"; 103 | max_kicks = "1"; 104 | max_msgs = "1"; 105 | max_whois = "1"; 106 | }; 107 | }; 108 | 109 | channels = ( 110 | { name = "#lobby"; chatnet = "EsperNet"; autojoin = "No"; }, 111 | { name = "#freenode"; chatnet = "Freenode"; autojoin = "No"; }, 112 | { name = "#irssi"; chatnet = "Freenode"; autojoin = "No"; }, 113 | { name = "#gamesurge"; chatnet = "GameSurge"; autojoin = "No"; }, 114 | { name = "#irssi"; chatnet = "IRCNet"; autojoin = "No"; }, 115 | { name = "#ircsource"; chatnet = "IRCSource"; autojoin = "No"; }, 116 | { name = "#netfuze"; chatnet = "NetFuze"; autojoin = "No"; }, 117 | { name = "#oftc"; chatnet = "OFTC"; autojoin = "No"; }, 118 | { name = "silc"; chatnet = "SILC"; autojoin = "No"; } 119 | ); 120 | 121 | aliases = { 122 | ATAG = "WINDOW SERVER"; 123 | ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}"; 124 | B = "BAN"; 125 | BACK = "AWAY"; 126 | BANS = "BAN"; 127 | BYE = "QUIT"; 128 | C = "CLEAR"; 129 | CALC = "EXEC - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi"; 130 | CHAT = "DCC CHAT"; 131 | CUBES = "SCRIPT EXEC Irssi::active_win->print(\"%_bases\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x0\\${_}0\\$_\" } '0'..'9','A'..'F' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_cubes\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { my \\$y = \\$_*6 \\; join '', map { my \\$x = \\$_ \\; map { \"%x\\$x\\$_\\$x\\$_\" } @{['0'..'9','A'..'Z']}[\\$y .. \\$y+5] } 1..6 }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) for 0..5 \\; Irssi::active_win->print(\"%_grays\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x7\\${_}7\\$_\" } 'A'..'X' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_mIRC extended colours\", MSGLEVEL_CLIENTCRAP) \\; my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 0..15 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; for my \\$z (0..6) { my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 16+(\\$z*12)..16+(\\$z*12)+11 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) }"; 132 | DATE = "TIME"; 133 | DEHIGHLIGHT = "DEHILIGHT"; 134 | DESCRIBE = "ACTION"; 135 | DHL = "DEHILIGHT"; 136 | EXEMPTLIST = "MODE $C +e"; 137 | EXIT = "QUIT"; 138 | GOTO = "SCROLLBACK GOTO"; 139 | HIGHLIGHT = "HILIGHT"; 140 | HL = "HILIGHT"; 141 | HOST = "USERHOST"; 142 | INVITELIST = "MODE $C +I"; 143 | J = "JOIN"; 144 | K = "KICK"; 145 | KB = "KICKBAN"; 146 | KN = "KNOCKOUT"; 147 | LAST = "LASTLOG"; 148 | LEAVE = "PART"; 149 | M = "MSG"; 150 | MUB = "UNBAN *"; 151 | N = "NAMES"; 152 | NMSG = "^MSG"; 153 | P = "PART"; 154 | Q = "QUERY"; 155 | RESET = "SET -default"; 156 | RUN = "SCRIPT LOAD"; 157 | SAY = "MSG *"; 158 | SB = "SCROLLBACK"; 159 | SBAR = "STATUSBAR"; 160 | SIGNOFF = "QUIT"; 161 | SV = "MSG * Irssi $J ($V) - http://www.irssi.org"; 162 | T = "TOPIC"; 163 | UB = "UNBAN"; 164 | UMODE = "MODE $N"; 165 | UNSET = "SET -clear"; 166 | W = "WHO"; 167 | WC = "WINDOW CLOSE"; 168 | WG = "WINDOW GOTO"; 169 | WJOIN = "JOIN -window"; 170 | WI = "WHOIS"; 171 | WII = "WHOIS $0 $0"; 172 | WL = "WINDOW LIST"; 173 | WN = "WINDOW NEW HIDDEN"; 174 | WQUERY = "QUERY -window"; 175 | WW = "WHOWAS"; 176 | 1 = "WINDOW GOTO 1"; 177 | 2 = "WINDOW GOTO 2"; 178 | 3 = "WINDOW GOTO 3"; 179 | 4 = "WINDOW GOTO 4"; 180 | 5 = "WINDOW GOTO 5"; 181 | 6 = "WINDOW GOTO 6"; 182 | 7 = "WINDOW GOTO 7"; 183 | 8 = "WINDOW GOTO 8"; 184 | 9 = "WINDOW GOTO 9"; 185 | 10 = "WINDOW GOTO 10"; 186 | 11 = "WINDOW GOTO 11"; 187 | 12 = "WINDOW GOTO 12"; 188 | 13 = "WINDOW GOTO 13"; 189 | 14 = "WINDOW GOTO 14"; 190 | 15 = "WINDOW GOTO 15"; 191 | 16 = "WINDOW GOTO 16"; 192 | 17 = "WINDOW GOTO 17"; 193 | 18 = "WINDOW GOTO 18"; 194 | 19 = "WINDOW GOTO 19"; 195 | 20 = "WINDOW GOTO 20"; 196 | 21 = "WINDOW GOTO 21"; 197 | 22 = "WINDOW GOTO 22"; 198 | 23 = "WINDOW GOTO 23"; 199 | 24 = "WINDOW GOTO 24"; 200 | 25 = "WINDOW GOTO 25"; 201 | 26 = "WINDOW GOTO 26"; 202 | 27 = "WINDOW GOTO 27"; 203 | 28 = "WINDOW GOTO 28"; 204 | 29 = "WINDOW GOTO 29"; 205 | 30 = "WINDOW GOTO 30"; 206 | 31 = "WINDOW GOTO 31"; 207 | 32 = "WINDOW GOTO 32"; 208 | 33 = "WINDOW GOTO 33"; 209 | 34 = "WINDOW GOTO 34"; 210 | 35 = "WINDOW GOTO 35"; 211 | 36 = "WINDOW GOTO 36"; 212 | 37 = "WINDOW GOTO 37"; 213 | 38 = "WINDOW GOTO 38"; 214 | 39 = "WINDOW GOTO 39"; 215 | 40 = "WINDOW GOTO 40"; 216 | 41 = "WINDOW GOTO 41"; 217 | 42 = "WINDOW GOTO 42"; 218 | 43 = "WINDOW GOTO 43"; 219 | 44 = "WINDOW GOTO 44"; 220 | 45 = "WINDOW GOTO 45"; 221 | 46 = "WINDOW GOTO 46"; 222 | 47 = "WINDOW GOTO 47"; 223 | 48 = "WINDOW GOTO 48"; 224 | 49 = "WINDOW GOTO 49"; 225 | 50 = "WINDOW GOTO 50"; 226 | 51 = "WINDOW GOTO 51"; 227 | 52 = "WINDOW GOTO 52"; 228 | 53 = "WINDOW GOTO 53"; 229 | 54 = "WINDOW GOTO 54"; 230 | 55 = "WINDOW GOTO 55"; 231 | 56 = "WINDOW GOTO 56"; 232 | 57 = "WINDOW GOTO 57"; 233 | 58 = "WINDOW GOTO 58"; 234 | 59 = "WINDOW GOTO 59"; 235 | 60 = "WINDOW GOTO 60"; 236 | 61 = "WINDOW GOTO 61"; 237 | 62 = "WINDOW GOTO 62"; 238 | 63 = "WINDOW GOTO 63"; 239 | 64 = "WINDOW GOTO 64"; 240 | 65 = "WINDOW GOTO 65"; 241 | 66 = "WINDOW GOTO 66"; 242 | 67 = "WINDOW GOTO 67"; 243 | 68 = "WINDOW GOTO 68"; 244 | 69 = "WINDOW GOTO 69"; 245 | 70 = "WINDOW GOTO 70"; 246 | 71 = "WINDOW GOTO 71"; 247 | 72 = "WINDOW GOTO 72"; 248 | 73 = "WINDOW GOTO 73"; 249 | 74 = "WINDOW GOTO 74"; 250 | 75 = "WINDOW GOTO 75"; 251 | 76 = "WINDOW GOTO 76"; 252 | 77 = "WINDOW GOTO 77"; 253 | 78 = "WINDOW GOTO 78"; 254 | 79 = "WINDOW GOTO 79"; 255 | 80 = "WINDOW GOTO 80"; 256 | 81 = "WINDOW GOTO 81"; 257 | 82 = "WINDOW GOTO 82"; 258 | 83 = "WINDOW GOTO 83"; 259 | 84 = "WINDOW GOTO 84"; 260 | 85 = "WINDOW GOTO 85"; 261 | 86 = "WINDOW GOTO 86"; 262 | 87 = "WINDOW GOTO 87"; 263 | 88 = "WINDOW GOTO 88"; 264 | 89 = "WINDOW GOTO 89"; 265 | 90 = "WINDOW GOTO 90"; 266 | 91 = "WINDOW GOTO 91"; 267 | 92 = "WINDOW GOTO 92"; 268 | 93 = "WINDOW GOTO 93"; 269 | 94 = "WINDOW GOTO 94"; 270 | 95 = "WINDOW GOTO 95"; 271 | 96 = "WINDOW GOTO 96"; 272 | 97 = "WINDOW GOTO 97"; 273 | 98 = "WINDOW GOTO 98"; 274 | 99 = "WINDOW GOTO 99"; 275 | }; 276 | 277 | statusbar = { 278 | 279 | items = { 280 | 281 | barstart = "{sbstart}"; 282 | barend = "{sbend}"; 283 | 284 | topicbarstart = "{topicsbstart}"; 285 | topicbarend = "{topicsbend}"; 286 | 287 | time = "{sb $Z}"; 288 | user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}"; 289 | 290 | window = "{sb $winref:$tag/$itemname{sbmode $M}}"; 291 | window_empty = "{sb $winref{sbservertag $tag}}"; 292 | 293 | prompt = "{prompt $[.15]itemname}"; 294 | prompt_empty = "{prompt $winname}"; 295 | 296 | topic = " $topic"; 297 | topic_empty = " Irssi v$J - http://www.irssi.org"; 298 | 299 | lag = "{sb Lag: $0-}"; 300 | act = "{sb Act: $0-}"; 301 | more = "-- more --"; 302 | }; 303 | 304 | default = { 305 | 306 | window = { 307 | 308 | disabled = "no"; 309 | type = "window"; 310 | placement = "bottom"; 311 | position = "1"; 312 | visible = "active"; 313 | 314 | items = { 315 | barstart = { priority = "100"; }; 316 | time = { }; 317 | user = { }; 318 | window = { }; 319 | window_empty = { }; 320 | lag = { priority = "-1"; }; 321 | act = { priority = "10"; }; 322 | more = { priority = "-1"; alignment = "right"; }; 323 | barend = { priority = "100"; alignment = "right"; }; 324 | }; 325 | }; 326 | 327 | window_inact = { 328 | 329 | type = "window"; 330 | placement = "bottom"; 331 | position = "1"; 332 | visible = "inactive"; 333 | 334 | items = { 335 | barstart = { priority = "100"; }; 336 | window = { }; 337 | window_empty = { }; 338 | more = { priority = "-1"; alignment = "right"; }; 339 | barend = { priority = "100"; alignment = "right"; }; 340 | }; 341 | }; 342 | 343 | prompt = { 344 | 345 | type = "root"; 346 | placement = "bottom"; 347 | position = "100"; 348 | visible = "always"; 349 | 350 | items = { 351 | prompt = { priority = "-1"; }; 352 | prompt_empty = { priority = "-1"; }; 353 | input = { priority = "10"; }; 354 | }; 355 | }; 356 | 357 | topic = { 358 | 359 | type = "root"; 360 | placement = "top"; 361 | position = "1"; 362 | visible = "always"; 363 | 364 | items = { 365 | topicbarstart = { priority = "100"; }; 366 | topic = { }; 367 | topic_empty = { }; 368 | topicbarend = { priority = "100"; alignment = "right"; }; 369 | }; 370 | }; 371 | }; 372 | }; 373 | settings = { 374 | core = { 375 | real_name = "MyUser"; 376 | user_name = "MyUser"; 377 | nick = "MyUser"; 378 | recode_transliterate = "no"; 379 | }; 380 | "fe-text" = { actlist_sort = "refnum"; }; 381 | }; 382 | -------------------------------------------------------------------------------- /root/defaults/nginx.conf: -------------------------------------------------------------------------------- 1 | user abc; 2 | worker_processes 1; 3 | pid /run/nginx.pid; 4 | 5 | events { 6 | worker_connections 768; 7 | # multi_accept on; 8 | } 9 | 10 | http { 11 | upstream backendrutorrent { 12 | server unix:/run/php/php-fpm-rutorrent.sock; 13 | } 14 | upstream backendrtorrent { 15 | server unix:/run/php/.rtorrent.sock; 16 | } 17 | 18 | ## 19 | # Basic Settings 20 | ## 21 | 22 | sendfile on; 23 | tcp_nopush on; 24 | tcp_nodelay on; 25 | keepalive_timeout 65; 26 | types_hash_max_size 2048; 27 | # server_tokens off; 28 | 29 | # server_names_hash_bucket_size 64; 30 | # server_name_in_redirect off; 31 | 32 | client_max_body_size 0; 33 | client_body_temp_path /tmp 1 2; 34 | 35 | include /etc/nginx/mime.types; 36 | include /config/nginx/conf.d/*.conf; 37 | default_type application/octet-stream; 38 | 39 | server { 40 | listen 80 default_server; 41 | root /var/www/localhost/rutorrent; 42 | index index.html index.htm index.php; 43 | 44 | server_name _; 45 | client_max_body_size 0; 46 | 47 | auth_basic "Restricted Content"; 48 | auth_basic_user_file /config/nginx/.htpasswd; 49 | 50 | location / { 51 | access_log /config/log/nginx/rutorrent.access.log; 52 | error_log /config/log/nginx/rutorrent.error.log; 53 | location ~ .php$ { 54 | fastcgi_split_path_info ^(.+\.php)(.*)$; 55 | fastcgi_pass backendrutorrent; 56 | fastcgi_index index.php; 57 | fastcgi_intercept_errors on; 58 | fastcgi_ignore_client_abort off; 59 | fastcgi_connect_timeout 60; 60 | fastcgi_send_timeout 180; 61 | fastcgi_read_timeout 180; 62 | fastcgi_buffer_size 128k; 63 | fastcgi_buffers 4 256k; 64 | fastcgi_busy_buffers_size 256k; 65 | fastcgi_temp_file_write_size 256k; 66 | include /etc/nginx/fastcgi_params; 67 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 68 | } 69 | } 70 | 71 | location /RPC2 { 72 | access_log /config/log/nginx/rutorrent.rpc2.access.log; 73 | error_log /config/log/nginx/rutorrent.rpc2.error.log; 74 | include /etc/nginx/scgi_params; 75 | scgi_pass backendrtorrent; 76 | } 77 | } 78 | ## 79 | # Logging Settings 80 | ## 81 | 82 | # access_log /config/log/nginx/access.log; 83 | # error_log /config/log/nginx/error.log; 84 | 85 | ## 86 | # Gzip Settings 87 | ## 88 | 89 | gzip on; 90 | gzip_disable "msie6"; 91 | 92 | # gzip_vary on; 93 | # gzip_proxied any; 94 | # gzip_comp_level 6; 95 | # gzip_buffers 16 8k; 96 | # gzip_http_version 1.1; 97 | # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; 98 | 99 | ## 100 | # nginx-naxsi config 101 | ## 102 | # Uncomment it if you installed nginx-naxsi 103 | ## 104 | 105 | #include /etc/nginx/naxsi_core.rules; 106 | 107 | ## 108 | # nginx-passenger config 109 | ## 110 | # Uncomment it if you installed nginx-passenger 111 | ## 112 | 113 | #passenger_root /usr; 114 | #passenger_ruby /usr/bin/ruby; 115 | 116 | ## 117 | # Virtual Host Configs 118 | ## 119 | # include /etc/nginx/conf.d/*.conf; 120 | # include /defaults/site-confs/*; 121 | } 122 | 123 | 124 | #mail { 125 | # # See sample authentication script at: 126 | # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript 127 | # 128 | # # auth_http localhost/auth.php; 129 | # # pop3_capabilities "TOP" "USER"; 130 | # # imap_capabilities "IMAP4rev1" "UIDPLUS"; 131 | # 132 | # server { 133 | # listen localhost:110; 134 | # protocol pop3; 135 | # proxy on; 136 | # } 137 | # 138 | # server { 139 | # listen localhost:143; 140 | # protocol imap; 141 | # proxy on; 142 | # } 143 | #} 144 | daemon off; 145 | -------------------------------------------------------------------------------- /root/defaults/nginx_ssl.conf: -------------------------------------------------------------------------------- 1 | user abc; 2 | worker_processes 1; 3 | pid /run/nginx.pid; 4 | 5 | events { 6 | worker_connections 768; 7 | # multi_accept on; 8 | } 9 | 10 | http { 11 | upstream backendrutorrent { 12 | server unix:/run/php/php-fpm-rutorrent.sock; 13 | } 14 | upstream backendrtorrent { 15 | server unix:/run/php/.rtorrent.sock; 16 | } 17 | 18 | ## 19 | # Basic Settings 20 | ## 21 | 22 | sendfile on; 23 | tcp_nopush on; 24 | tcp_nodelay on; 25 | keepalive_timeout 65; 26 | types_hash_max_size 2048; 27 | # server_tokens off; 28 | 29 | # server_names_hash_bucket_size 64; 30 | # server_name_in_redirect off; 31 | 32 | client_max_body_size 0; 33 | client_body_temp_path /tmp 1 2; 34 | 35 | include /etc/nginx/mime.types; 36 | include /config/nginx/conf.d/*.conf; 37 | default_type application/octet-stream; 38 | 39 | server { 40 | listen 443 ssl default_server; 41 | root /var/www/localhost/rutorrent; 42 | index index.html index.htm index.php; 43 | 44 | server_name _; 45 | client_max_body_size 0; 46 | 47 | auth_basic "Restricted Content"; 48 | auth_basic_user_file /config/nginx/.htpasswd; 49 | 50 | location / { 51 | access_log /config/log/nginx/rutorrent.access.log; 52 | error_log /config/log/nginx/rutorrent.error.log; 53 | location ~ .php$ { 54 | fastcgi_split_path_info ^(.+\.php)(.*)$; 55 | fastcgi_pass backendrutorrent; 56 | fastcgi_index index.php; 57 | fastcgi_intercept_errors on; 58 | fastcgi_ignore_client_abort off; 59 | fastcgi_connect_timeout 60; 60 | fastcgi_send_timeout 180; 61 | fastcgi_read_timeout 180; 62 | fastcgi_buffer_size 128k; 63 | fastcgi_buffers 4 256k; 64 | fastcgi_busy_buffers_size 256k; 65 | fastcgi_temp_file_write_size 256k; 66 | include /etc/nginx/fastcgi_params; 67 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 68 | } 69 | } 70 | 71 | location /RPC2 { 72 | access_log /config/log/nginx/rutorrent.rpc2.access.log; 73 | error_log /config/log/nginx/rutorrent.rpc2.error.log; 74 | include /etc/nginx/scgi_params; 75 | scgi_pass backendrtorrent; 76 | } 77 | } 78 | ## 79 | # Logging Settings 80 | ## 81 | 82 | # access_log /config/log/nginx/access.log; 83 | # error_log /config/log/nginx/error.log; 84 | 85 | ## 86 | # Gzip Settings 87 | ## 88 | 89 | gzip on; 90 | gzip_disable "msie6"; 91 | 92 | # gzip_vary on; 93 | # gzip_proxied any; 94 | # gzip_comp_level 6; 95 | # gzip_buffers 16 8k; 96 | # gzip_http_version 1.1; 97 | # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; 98 | 99 | ## 100 | # nginx-naxsi config 101 | ## 102 | # Uncomment it if you installed nginx-naxsi 103 | ## 104 | 105 | #include /etc/nginx/naxsi_core.rules; 106 | 107 | ## 108 | # nginx-passenger config 109 | ## 110 | # Uncomment it if you installed nginx-passenger 111 | ## 112 | 113 | #passenger_root /usr; 114 | #passenger_ruby /usr/bin/ruby; 115 | 116 | ## 117 | # Virtual Host Configs 118 | ## 119 | # include /etc/nginx/conf.d/*.conf; 120 | # include /defaults/site-confs/*; 121 | } 122 | 123 | 124 | #mail { 125 | # # See sample authentication script at: 126 | # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript 127 | # 128 | # # auth_http localhost/auth.php; 129 | # # pop3_capabilities "TOP" "USER"; 130 | # # imap_capabilities "IMAP4rev1" "UIDPLUS"; 131 | # 132 | # server { 133 | # listen localhost:110; 134 | # protocol pop3; 135 | # proxy on; 136 | # } 137 | # 138 | # server { 139 | # listen localhost:143; 140 | # protocol imap; 141 | # proxy on; 142 | # } 143 | #} 144 | daemon off; 145 | -------------------------------------------------------------------------------- /root/defaults/rtorrent.rc: -------------------------------------------------------------------------------- 1 | # Initialize plugins on rtorrent start without opening webui 2 | execute = {sh,-c,/usr/bin/php7 /usr/share/webapps/rutorrent/php/initplugins.php abc &} 3 | execute = {sh,-c,/usr/bin/php7 /usr/share/webapps/rutorrent/php/initplugins.php admin &} 4 | 5 | # Instance layout (base paths) 6 | method.insert = cfg.basedir, private|const|string, (cat,"/config/rtorrent/") 7 | method.insert = cfg.watch, private|const|string, (cat,"/downloads/watch/") 8 | method.insert = cfg.logs, private|const|string, (cat,"/config/log/rtorrent/") 9 | method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent.log") 10 | 11 | # Listening port for incoming peer traffic (fixed; you can also randomize it) 12 | network.port_range.set = 51415-51415 13 | network.port_random.set = no 14 | 15 | # Directory Management 16 | session.path.set = (cat, (cfg.basedir), "rtorrent_sess") 17 | directory.default.set = (cat,"/downloads/") 18 | 19 | # Logging: 20 | # Levels = critical error warn notice info debug 21 | # Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_* 22 | log.execute = (cat, (cfg.logs), "execute.log") 23 | print = (cat, "Logging to ", (cfg.logfile)) 24 | log.open_file = "log", (cfg.logfile) 25 | log.add_output = "info", "log" 26 | #log.add_output = "tracker_debug", "log" 27 | 28 | # Prepare rtorrent communication socket 29 | execute.nothrow = rm,/run/php/.rtorrent.sock 30 | network.scgi.open_local = /run/php/.rtorrent.sock 31 | schedule = socket_chmod,0,0,"execute=chmod,0660,/run/php/.rtorrent.sock" 32 | schedule = socket_chgrp,0,0,"execute=chgrp,abc,/run/php/.rtorrent.sock" 33 | 34 | # Other operational settings (check & adapt) 35 | system.cwd.set = (directory.default) 36 | network.http.dns_cache_timeout.set = 25 37 | #network.http.capath.set = "/etc/ssl/certs" 38 | #network.http.ssl_verify_peer.set = 0 39 | #network.http.ssl_verify_host.set = 0 40 | #keys.layout.set = qwerty 41 | 42 | # Maximum and minimum number of peers to connect to per torrent 43 | throttle.min_peers.normal.set = 1 44 | throttle.max_peers.normal.set = 150 45 | 46 | # Same as above but for seeding completed torrents (-1 = same as downloading) 47 | throttle.min_peers.seed.set = -1 48 | throttle.max_peers.seed.set = -1 49 | 50 | # Maximum number of simultanious uploads per torrent 51 | throttle.max_uploads.set = 250 52 | 53 | # Global upload and download rate in KiB. "0" for unlimited 54 | throttle.global_down.max_rate.set_kb = 0 55 | throttle.global_up.max_rate.set_kb = 0 56 | 57 | # Maximum number of simultaneous downloads and uploads slots (global slots!) (`max_downloads_global`, `max_uploads_global`) 58 | throttle.max_downloads.global.set = 0 59 | throttle.max_uploads.global.set = 0 60 | 61 | # Enable DHT support for trackerless torrents or when all trackers are down 62 | # May be set to "disable" (completely disable DHT), "off" (do not start DHT), 63 | # "auto" (start and stop DHT as needed), or "on" (start DHT immediately) 64 | dht.mode.set = off 65 | 66 | # Enable peer exchange (for torrents not marked private) 67 | protocol.pex.set = no 68 | 69 | # Check hash for finished torrents. Might be usefull until the bug is 70 | # fixed that causes lack of diskspace not to be properly reported 71 | pieces.hash.on_completion.set = no 72 | 73 | # Set whether the client should try to connect to UDP trackers 74 | trackers.use_udp.set = yes 75 | 76 | # Whether to allocate disk space for a new torrent. Default: `0` 77 | system.file.allocate.set = 1 78 | 79 | # Preloading a piece of a file. Default: `0` Possible values: `0` (Off) , `1` (Madvise) , `2` (Direct paging). 80 | pieces.preload.type.set = 2 81 | #pieces.preload.min_size.set = 262144 82 | #pieces.preload.min_rate.set = 5120 83 | 84 | # Memory resource usage (increase if you have a large number of items loaded, 85 | # and/or the available resources to spend) 86 | pieces.memory.max.set = 4G 87 | network.xmlrpc.size_limit.set = 4M 88 | 89 | # Alternative calls to bind and ip that should handle dynamic ip's 90 | #schedule2 = ip_tick,0,1800,ip=rakshasa 91 | #schedule2 = bind_tick,0,1800,bind=rakshasa 92 | 93 | # Encryption options, set to none (default) or any combination of the following: 94 | # allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext 95 | protocol.encryption.set = allow_incoming,try_outgoing,enable_retry 96 | 97 | # Set the umask for this process, which is applied to all files created by the program 98 | system.umask.set = 0022 99 | 100 | # Add a preferred filename encoding to the list 101 | encoding.add = utf8 102 | 103 | # Watch a directory for new torrents, and stop those that have been deleted 104 | schedule2 = watch_directory_99,10,10,(cat,"load.start=",(cfg.watch),"*.torrent,d.custom1.set=/downloads/completed/") 105 | #schedule2 = untied_directory, 5, 5, (cat,"stop_untied=",(cfg.watch),"*.torrent") 106 | 107 | # watch subdirectory by tracker 108 | schedule2 = watch_directory_1,10,10,(cat,"load.start=",(cfg.watch),"/bajaunapeli/*.torrent,d.directory.set=/downloads/bajaunapeli/") 109 | schedule2 = watch_directory_2,10,10,(cat,"load.start=",(cfg.watch),"/bitspyder/*.torrent,d.directory.set=/downloads/bitspyder/") 110 | schedule2 = watch_directory_3,10,10,(cat,"load.start=",(cfg.watch),"/torrentfactory/*.torrent,d.directory.set=/downloads/torrentfactory/") 111 | schedule2 = watch_directory_4,10,10,(cat,"load.start=",(cfg.watch),"/hachede/*.torrent,d.directory.set=/downloads/hachede/") 112 | schedule2 = watch_directory_5,10,10,(cat,"load.start=",(cfg.watch),"/hdcity/*.torrent,d.directory.set=/downloads/hdcity/") 113 | schedule2 = watch_directory_6,10,10,(cat,"load.start=",(cfg.watch),"/learnflakes/*.torrent,d.directory.set=/downloads/learnflakes/") 114 | schedule2 = watch_directory_7,10,10,(cat,"load.start=",(cfg.watch),"/puntotorrent/*.torrent,d.directory.set=/downloads/puntotorrent/") 115 | schedule2 = watch_directory_8,10,10,(cat,"load.start=",(cfg.watch),"/tbplus/*.torrent,d.directory.set=/downloads/tbplus/") 116 | schedule2 = watch_directory_9,10,10,(cat,"load.start=",(cfg.watch),"/waffles/*.torrent,d.directory.set=/downloads/waffles/") 117 | schedule2 = watch_directory_11,10,10,(cat,"load.start=",(cfg.watch),"/xbytes/*.torrent,d.directory.set=/downloads/xbytes/") 118 | schedule2 = watch_directory_12,10,10,(cat,"load.start=",(cfg.watch),"/otros/*.torrent,d.directory.set=/downloads/otros/") 119 | schedule2 = watch_directory_13,10,10,(cat,"load.start=",(cfg.watch),"/pedros/*.torrent,d.directory.set=/downloads/pedros/") 120 | schedule2 = watch_directory_14,10,10,(cat,"load.start=",(cfg.watch),"/cinemaggedon/*.torrent,d.directory.set=/downloads/cinemaggedon/") 121 | schedule2 = watch_directory_15,10,10,(cat,"load.start=",(cfg.watch),"/torrentland/*.torrent,d.directory.set=/downloads/torrentland/") 122 | schedule2 = watch_directory_16,10,10,(cat,"load.start=",(cfg.watch),"/tunetraxx/*.torrent,d.directory.set=/downloads/tunetraxx/") 123 | schedule2 = watch_directory_17,10,10,(cat,"load.start=",(cfg.watch),"/brokenstones/*.torrent,d.directory.set=/downloads/brokenstones/") 124 | schedule2 = watch_directory_18,10,10,(cat,"load.start=",(cfg.watch),"/32pages/*.torrent,d.directory.set=/downloads/32pages/") 125 | schedule2 = watch_directory_19,10,10,(cat,"load.start=",(cfg.watch),"/lztr/*.torrent,d.directory.set=/downloads/lztr/") 126 | schedule2 = watch_directory_20,10,10,(cat,"load.start=",(cfg.watch),"/p2pelite/*.torrent,d.directory.set=/downloads/p2pelite/") 127 | schedule2 = watch_directory_21,10,10,(cat,"load.start=",(cfg.watch),"/bitgamer/*.torrent,d.directory.set=/downloads/bitgamer/") 128 | schedule2 = watch_directory_22,10,10,(cat,"load.start=",(cfg.watch),"/psytorrents/*.torrent,d.directory.set=/downloads/psytorrents/") 129 | schedule2 = watch_directory_23,10,10,(cat,"load.start=",(cfg.watch),"/pleasuredome/*.torrent,d.directory.set=/downloads/pleasuredome/") 130 | schedule2 = watch_directory_24,10,10,(cat,"load.start=",(cfg.watch),"/hdspain/*.torrent,d.directory.set=/downloads/hdspain/") 131 | schedule2 = watch_directory_25,10,10,(cat,"load.start=",(cfg.watch),"/iptorrents/*.torrent,d.directory.set=/downloads/iptorrents/") 132 | schedule2 = watch_directory_26,10,10,(cat,"load.start=",(cfg.watch),"/trancetraffic/*.torrent,d.directory.set=/downloads/trancetraffic/") 133 | schedule2 = watch_directory_27,10,10,(cat,"load.start=",(cfg.watch),"/morethantv/*.torrent,d.directory.set=/downloads/morethantv/") 134 | schedule2 = watch_directory_28,10,10,(cat,"load.start=",(cfg.watch),"/passthepopcorn/*.torrent,d.directory.set=/downloads/passthepopcorn/") 135 | schedule2 = watch_directory_29,10,10,(cat,"load.start=",(cfg.watch),"/gp32spain/*.torrent,d.directory.set=/downloads/gp32spain/") 136 | schedule2 = watch_directory_30,10,10,(cat,"load.start=",(cfg.watch),"/gazellegames/*.torrent,d.directory.set=/downloads/gazellegames/") 137 | schedule2 = watch_directory_31,10,10,(cat,"load.start=",(cfg.watch),"/opencd/*.torrent,d.directory.set=/downloads/opencd/") 138 | schedule2 = watch_directory_32,10,10,(cat,"load.start=",(cfg.watch),"/mteam/*.torrent,d.directory.set=/downloads/mteam/") 139 | schedule2 = watch_directory_33,10,10,(cat,"load.start=",(cfg.watch),"/retrowithin/*.torrent,d.directory.set=/downloads/retrowithin/") 140 | schedule2 = watch_directory_34,10,10,(cat,"load.start=",(cfg.watch),"/divteam/*.torrent,d.directory.set=/downloads/divteam/") 141 | schedule2 = watch_directory_35,10,10,(cat,"load.start=",(cfg.watch),"/racingforme/*.torrent,d.directory.set=/downloads/racingforme/") 142 | schedule2 = watch_directory_36,10,10,(cat,"load.start=",(cfg.watch),"/bibliotik/*.torrent,d.directory.set=/downloads/bibliotik/") 143 | schedule2 = watch_directory_37,10,10,(cat,"load.start=",(cfg.watch),"/beyondhd/*.torrent,d.directory.set=/downloads/beyondhd/") 144 | schedule2 = watch_directory_38,10,10,(cat,"load.start=",(cfg.watch),"/myanonamouse/*.torrent,d.directory.set=/downloads/myanonamouse/") 145 | schedule2 = watch_directory_39,10,10,(cat,"load.start=",(cfg.watch),"/ultimategamer/*.torrent,d.directory.set=/downloads/ultimategamer/") 146 | schedule2 = watch_directory_40,10,10,(cat,"load.start=",(cfg.watch),"/ultimategamer/*.torrent,d.directory.set=/downloads/ultimategamer/") 147 | schedule2 = watch_directory_41,10,10,(cat,"load.start=",(cfg.watch),"/x264/*.torrent,d.directory.set=/downloads/x264/") 148 | schedule2 = watch_directory_42,10,10,(cat,"load.start=",(cfg.watch),"/awesomehd/*.torrent,d.directory.set=/downloads/awesomehd/") 149 | schedule2 = watch_directory_43,10,10,(cat,"load.start=",(cfg.watch),"/broadcasthenet/*.torrent,d.directory.set=/downloads/broadcasthenet/") 150 | schedule2 = watch_directory_44,10,10,(cat,"load.start=",(cfg.watch),"/bitme/*.torrent,d.directory.set=/downloads/bitme/") 151 | schedule2 = watch_directory_45,10,10,(cat,"load.start=",(cfg.watch),"/theplace/*.torrent,d.directory.set=/downloads/theplace/") 152 | schedule2 = watch_directory_46,10,10,(cat,"load.start=",(cfg.watch),"/theshow/*.torrent,d.directory.set=/downloads/theshow/") 153 | schedule2 = watch_directory_47,10,10,(cat,"load.start=",(cfg.watch),"/thegeeks/*.torrent,d.directory.set=/downloads/thegeeks/") 154 | schedule2 = watch_directory_48,10,10,(cat,"load.start=",(cfg.watch),"/thevault/*.torrent,d.directory.set=/downloads/thevault/") 155 | schedule2 = watch_directory_49,10,10,(cat,"load.start=",(cfg.watch),"/theempire/*.torrent,d.directory.set=/downloads/theempire/") 156 | schedule2 = watch_directory_50,10,10,(cat,"load.start=",(cfg.watch),"/theoccult/*.torrent,d.directory.set=/downloads/theoccult/") 157 | schedule2 = watch_directory_51,10,10,(cat,"load.start=",(cfg.watch),"/torrentleech/*.torrent,d.directory.set=/downloads/torrentleech/") 158 | schedule2 = watch_directory_52,10,10,(cat,"load.start=",(cfg.watch),"/hdbits/*.torrent,d.directory.set=/downloads/hdbits/") 159 | schedule2 = watch_directory_53,10,10,(cat,"load.start=",(cfg.watch),"/zonaq/*.torrent,d.directory.set=/downloads/zonaq/") 160 | schedule2 = watch_directory_54,10,10,(cat,"load.start=",(cfg.watch),"/torrentech/*.torrent,d.directory.set=/downloads/torrentech/") 161 | schedule2 = watch_directory_55,10,10,(cat,"load.start=",(cfg.watch),"/sceneaccess/*.torrent,d.directory.set=/downloads/sceneaccess/") 162 | schedule2 = watch_directory_56,10,10,(cat,"load.start=",(cfg.watch),"/efectodoppler/*.torrent,d.directory.set=/downloads/efectodoppler/") 163 | schedule2 = watch_directory_57,10,10,(cat,"load.start=",(cfg.watch),"/musicvids/*.torrent,d.directory.set=/downloads/musicvids/") 164 | schedule2 = watch_directory_58,10,10,(cat,"load.start=",(cfg.watch),"/apollo/*.torrent,d.directory.set=/downloads/apollo/") 165 | schedule2 = watch_directory_59,10,10,(cat,"load.start=",(cfg.watch),"/passtheheadphones/*.torrent,d.directory.set=/downloads/passtheheadphones/") 166 | schedule2 = watch_directory_60,10,10,(cat,"load.start=",(cfg.watch),"/notwhatcd/*.torrent,d.directory.set=/downloads/notwhatcd/") 167 | 168 | # Close torrents when diskspace is low 169 | schedule2 = monitor_diskspace, 15, 60, ((close_low_diskspace,1000M)) 170 | 171 | # Move finished (no need Autotools/Automove plugin on ruTorrent) 172 | #method.insert = d.move_to_complete, simple, "d.directory.set=$argument.1=; execute=mkdir,-p,$argument.1=; execute=mv,-u,$argument.0=,$argument.1=; d.save_full_session=" 173 | #method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.custom1=" 174 | 175 | # Commit session data 176 | schedule2 = session_save, 240, 300, ((session.save)) 177 | 178 | # Erase data when torrent deleted (no need erasedata plugin on ruTorrent) 179 | #method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path=" 180 | 181 | # Telegram Notifications (independent from rTelegram) 182 | #method.set_key = event.download.finished,notify_me,"execute=/config/rtorrent/notify_telegram.sh,$d.name=" 183 | 184 | # rTelegram Notifications (Uncomment if you have rTelegram variables) 185 | #method.set_key = event.download.finished, log_completed, \ 186 | "execute.nothrow = sh, -c, \"echo >> /config/log/rtelegram/rtelegram_completed.log \\\"$0\\\"\", $d.name=" 187 | -------------------------------------------------------------------------------- /root/defaults/rtorrent.rc.pyroscope: -------------------------------------------------------------------------------- 1 | # Initialize plugins on rtorrent start without opening webui 2 | execute = {sh,-c,/usr/bin/php7 /usr/share/webapps/rutorrent/php/initplugins.php abc &} 3 | execute = {sh,-c,/usr/bin/php7 /usr/share/webapps/rutorrent/php/initplugins.php admin &} 4 | 5 | # Instance layout (base paths) 6 | method.insert = cfg.basedir, private|const|string, (cat,"/config/rtorrent/") 7 | method.insert = cfg.watch, private|const|string, (cat,"/downloads/watch/") 8 | method.insert = cfg.logs, private|const|string, (cat,"/config/log/rtorrent/") 9 | method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent.log") 10 | 11 | # Listening port for incoming peer traffic (fixed; you can also randomize it) 12 | network.port_range.set = 51415-51415 13 | network.port_random.set = no 14 | 15 | # Directory Management 16 | session.path.set = (cat, (cfg.basedir), "rtorrent_sess") 17 | directory.default.set = (cat,"/downloads/") 18 | 19 | # Logging: 20 | # Levels = critical error warn notice info debug 21 | # Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_* 22 | log.execute = (cat, (cfg.logs), "execute.log") 23 | print = (cat, "Logging to ", (cfg.logfile)) 24 | log.open_file = "log", (cfg.logfile) 25 | log.add_output = "info", "log" 26 | #log.add_output = "tracker_debug", "log" 27 | 28 | # Prepare rtorrent communication socket 29 | execute.nothrow = rm,/run/php/.rtorrent.sock 30 | network.scgi.open_local = /run/php/.rtorrent.sock 31 | schedule = socket_chmod,0,0,"execute=chmod,0660,/run/php/.rtorrent.sock" 32 | schedule = socket_chgrp,0,0,"execute=chgrp,abc,/run/php/.rtorrent.sock" 33 | 34 | # Other operational settings (check & adapt) 35 | system.cwd.set = (directory.default) 36 | network.http.dns_cache_timeout.set = 25 37 | #network.http.capath.set = "/etc/ssl/certs" 38 | #network.http.ssl_verify_peer.set = 0 39 | #network.http.ssl_verify_host.set = 0 40 | #keys.layout.set = qwerty 41 | 42 | # Maximum and minimum number of peers to connect to per torrent 43 | throttle.min_peers.normal.set = 1 44 | throttle.max_peers.normal.set = 150 45 | 46 | # Same as above but for seeding completed torrents (-1 = same as downloading) 47 | throttle.min_peers.seed.set = -1 48 | throttle.max_peers.seed.set = -1 49 | 50 | # Maximum number of simultanious uploads per torrent 51 | throttle.max_uploads.set = 250 52 | 53 | # Global upload and download rate in KiB. "0" for unlimited 54 | throttle.global_down.max_rate.set_kb = 0 55 | throttle.global_up.max_rate.set_kb = 0 56 | 57 | # Maximum number of simultaneous downloads and uploads slots (global slots!) (`max_downloads_global`, `max_uploads_global`) 58 | throttle.max_downloads.global.set = 0 59 | throttle.max_uploads.global.set = 0 60 | 61 | # Enable DHT support for trackerless torrents or when all trackers are down 62 | # May be set to "disable" (completely disable DHT), "off" (do not start DHT), 63 | # "auto" (start and stop DHT as needed), or "on" (start DHT immediately) 64 | dht.mode.set = off 65 | 66 | # Enable peer exchange (for torrents not marked private) 67 | protocol.pex.set = no 68 | 69 | # Check hash for finished torrents. Might be usefull until the bug is 70 | # fixed that causes lack of diskspace not to be properly reported 71 | pieces.hash.on_completion.set = no 72 | 73 | # Set whether the client should try to connect to UDP trackers 74 | trackers.use_udp.set = yes 75 | 76 | # Whether to allocate disk space for a new torrent. Default: `0` 77 | system.file.allocate.set = 1 78 | 79 | # Preloading a piece of a file. Default: `0` Possible values: `0` (Off) , `1` (Madvise) , `2` (Direct paging). 80 | pieces.preload.type.set = 2 81 | #pieces.preload.min_size.set = 262144 82 | #pieces.preload.min_rate.set = 5120 83 | 84 | # Memory resource usage (increase if you have a large number of items loaded, 85 | # and/or the available resources to spend) 86 | pieces.memory.max.set = 4G 87 | network.xmlrpc.size_limit.set = 4M 88 | 89 | # Alternative calls to bind and ip that should handle dynamic ip's 90 | #schedule2 = ip_tick,0,1800,ip=rakshasa 91 | #schedule2 = bind_tick,0,1800,bind=rakshasa 92 | 93 | # Encryption options, set to none (default) or any combination of the following: 94 | # allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext 95 | protocol.encryption.set = allow_incoming,try_outgoing,enable_retry 96 | 97 | # Set the umask for this process, which is applied to all files created by the program 98 | system.umask.set = 0022 99 | 100 | # Add a preferred filename encoding to the list 101 | encoding.add = utf8 102 | 103 | # Watch a directory for new torrents, and stop those that have been deleted 104 | schedule2 = watch_directory_99,10,10,(cat,"load.start=",(cfg.watch),"*.torrent,d.custom1.set=/downloads/completed/") 105 | #schedule2 = untied_directory, 5, 5, (cat,"stop_untied=",(cfg.watch),"*.torrent") 106 | 107 | # watch subdirectory by tracker 108 | schedule2 = watch_directory_1,10,10,(cat,"load.start=",(cfg.watch),"/bajaunapeli/*.torrent,d.directory.set=/downloads/bajaunapeli/") 109 | schedule2 = watch_directory_2,10,10,(cat,"load.start=",(cfg.watch),"/bitspyder/*.torrent,d.directory.set=/downloads/bitspyder/") 110 | schedule2 = watch_directory_3,10,10,(cat,"load.start=",(cfg.watch),"/torrentfactory/*.torrent,d.directory.set=/downloads/torrentfactory/") 111 | schedule2 = watch_directory_4,10,10,(cat,"load.start=",(cfg.watch),"/hachede/*.torrent,d.directory.set=/downloads/hachede/") 112 | schedule2 = watch_directory_5,10,10,(cat,"load.start=",(cfg.watch),"/hdcity/*.torrent,d.directory.set=/downloads/hdcity/") 113 | schedule2 = watch_directory_6,10,10,(cat,"load.start=",(cfg.watch),"/learnflakes/*.torrent,d.directory.set=/downloads/learnflakes/") 114 | schedule2 = watch_directory_7,10,10,(cat,"load.start=",(cfg.watch),"/puntotorrent/*.torrent,d.directory.set=/downloads/puntotorrent/") 115 | schedule2 = watch_directory_8,10,10,(cat,"load.start=",(cfg.watch),"/tbplus/*.torrent,d.directory.set=/downloads/tbplus/") 116 | schedule2 = watch_directory_9,10,10,(cat,"load.start=",(cfg.watch),"/waffles/*.torrent,d.directory.set=/downloads/waffles/") 117 | schedule2 = watch_directory_11,10,10,(cat,"load.start=",(cfg.watch),"/xbytes/*.torrent,d.directory.set=/downloads/xbytes/") 118 | schedule2 = watch_directory_12,10,10,(cat,"load.start=",(cfg.watch),"/otros/*.torrent,d.directory.set=/downloads/otros/") 119 | schedule2 = watch_directory_13,10,10,(cat,"load.start=",(cfg.watch),"/pedros/*.torrent,d.directory.set=/downloads/pedros/") 120 | schedule2 = watch_directory_14,10,10,(cat,"load.start=",(cfg.watch),"/cinemaggedon/*.torrent,d.directory.set=/downloads/cinemaggedon/") 121 | schedule2 = watch_directory_15,10,10,(cat,"load.start=",(cfg.watch),"/torrentland/*.torrent,d.directory.set=/downloads/torrentland/") 122 | schedule2 = watch_directory_16,10,10,(cat,"load.start=",(cfg.watch),"/tunetraxx/*.torrent,d.directory.set=/downloads/tunetraxx/") 123 | schedule2 = watch_directory_17,10,10,(cat,"load.start=",(cfg.watch),"/brokenstones/*.torrent,d.directory.set=/downloads/brokenstones/") 124 | schedule2 = watch_directory_18,10,10,(cat,"load.start=",(cfg.watch),"/32pages/*.torrent,d.directory.set=/downloads/32pages/") 125 | schedule2 = watch_directory_19,10,10,(cat,"load.start=",(cfg.watch),"/lztr/*.torrent,d.directory.set=/downloads/lztr/") 126 | schedule2 = watch_directory_20,10,10,(cat,"load.start=",(cfg.watch),"/p2pelite/*.torrent,d.directory.set=/downloads/p2pelite/") 127 | schedule2 = watch_directory_21,10,10,(cat,"load.start=",(cfg.watch),"/bitgamer/*.torrent,d.directory.set=/downloads/bitgamer/") 128 | schedule2 = watch_directory_22,10,10,(cat,"load.start=",(cfg.watch),"/psytorrents/*.torrent,d.directory.set=/downloads/psytorrents/") 129 | schedule2 = watch_directory_23,10,10,(cat,"load.start=",(cfg.watch),"/pleasuredome/*.torrent,d.directory.set=/downloads/pleasuredome/") 130 | schedule2 = watch_directory_24,10,10,(cat,"load.start=",(cfg.watch),"/hdspain/*.torrent,d.directory.set=/downloads/hdspain/") 131 | schedule2 = watch_directory_25,10,10,(cat,"load.start=",(cfg.watch),"/iptorrents/*.torrent,d.directory.set=/downloads/iptorrents/") 132 | schedule2 = watch_directory_26,10,10,(cat,"load.start=",(cfg.watch),"/trancetraffic/*.torrent,d.directory.set=/downloads/trancetraffic/") 133 | schedule2 = watch_directory_27,10,10,(cat,"load.start=",(cfg.watch),"/morethantv/*.torrent,d.directory.set=/downloads/morethantv/") 134 | schedule2 = watch_directory_28,10,10,(cat,"load.start=",(cfg.watch),"/passthepopcorn/*.torrent,d.directory.set=/downloads/passthepopcorn/") 135 | schedule2 = watch_directory_29,10,10,(cat,"load.start=",(cfg.watch),"/gp32spain/*.torrent,d.directory.set=/downloads/gp32spain/") 136 | schedule2 = watch_directory_30,10,10,(cat,"load.start=",(cfg.watch),"/gazellegames/*.torrent,d.directory.set=/downloads/gazellegames/") 137 | schedule2 = watch_directory_31,10,10,(cat,"load.start=",(cfg.watch),"/opencd/*.torrent,d.directory.set=/downloads/opencd/") 138 | schedule2 = watch_directory_32,10,10,(cat,"load.start=",(cfg.watch),"/mteam/*.torrent,d.directory.set=/downloads/mteam/") 139 | schedule2 = watch_directory_33,10,10,(cat,"load.start=",(cfg.watch),"/retrowithin/*.torrent,d.directory.set=/downloads/retrowithin/") 140 | schedule2 = watch_directory_34,10,10,(cat,"load.start=",(cfg.watch),"/divteam/*.torrent,d.directory.set=/downloads/divteam/") 141 | schedule2 = watch_directory_35,10,10,(cat,"load.start=",(cfg.watch),"/racingforme/*.torrent,d.directory.set=/downloads/racingforme/") 142 | schedule2 = watch_directory_36,10,10,(cat,"load.start=",(cfg.watch),"/bibliotik/*.torrent,d.directory.set=/downloads/bibliotik/") 143 | schedule2 = watch_directory_37,10,10,(cat,"load.start=",(cfg.watch),"/beyondhd/*.torrent,d.directory.set=/downloads/beyondhd/") 144 | schedule2 = watch_directory_38,10,10,(cat,"load.start=",(cfg.watch),"/myanonamouse/*.torrent,d.directory.set=/downloads/myanonamouse/") 145 | schedule2 = watch_directory_39,10,10,(cat,"load.start=",(cfg.watch),"/ultimategamer/*.torrent,d.directory.set=/downloads/ultimategamer/") 146 | schedule2 = watch_directory_40,10,10,(cat,"load.start=",(cfg.watch),"/ultimategamer/*.torrent,d.directory.set=/downloads/ultimategamer/") 147 | schedule2 = watch_directory_41,10,10,(cat,"load.start=",(cfg.watch),"/x264/*.torrent,d.directory.set=/downloads/x264/") 148 | schedule2 = watch_directory_42,10,10,(cat,"load.start=",(cfg.watch),"/awesomehd/*.torrent,d.directory.set=/downloads/awesomehd/") 149 | schedule2 = watch_directory_43,10,10,(cat,"load.start=",(cfg.watch),"/broadcasthenet/*.torrent,d.directory.set=/downloads/broadcasthenet/") 150 | schedule2 = watch_directory_44,10,10,(cat,"load.start=",(cfg.watch),"/bitme/*.torrent,d.directory.set=/downloads/bitme/") 151 | schedule2 = watch_directory_45,10,10,(cat,"load.start=",(cfg.watch),"/theplace/*.torrent,d.directory.set=/downloads/theplace/") 152 | schedule2 = watch_directory_46,10,10,(cat,"load.start=",(cfg.watch),"/theshow/*.torrent,d.directory.set=/downloads/theshow/") 153 | schedule2 = watch_directory_47,10,10,(cat,"load.start=",(cfg.watch),"/thegeeks/*.torrent,d.directory.set=/downloads/thegeeks/") 154 | schedule2 = watch_directory_48,10,10,(cat,"load.start=",(cfg.watch),"/thevault/*.torrent,d.directory.set=/downloads/thevault/") 155 | schedule2 = watch_directory_49,10,10,(cat,"load.start=",(cfg.watch),"/theempire/*.torrent,d.directory.set=/downloads/theempire/") 156 | schedule2 = watch_directory_50,10,10,(cat,"load.start=",(cfg.watch),"/theoccult/*.torrent,d.directory.set=/downloads/theoccult/") 157 | schedule2 = watch_directory_51,10,10,(cat,"load.start=",(cfg.watch),"/torrentleech/*.torrent,d.directory.set=/downloads/torrentleech/") 158 | schedule2 = watch_directory_52,10,10,(cat,"load.start=",(cfg.watch),"/hdbits/*.torrent,d.directory.set=/downloads/hdbits/") 159 | schedule2 = watch_directory_53,10,10,(cat,"load.start=",(cfg.watch),"/zonaq/*.torrent,d.directory.set=/downloads/zonaq/") 160 | schedule2 = watch_directory_54,10,10,(cat,"load.start=",(cfg.watch),"/torrentech/*.torrent,d.directory.set=/downloads/torrentech/") 161 | schedule2 = watch_directory_55,10,10,(cat,"load.start=",(cfg.watch),"/sceneaccess/*.torrent,d.directory.set=/downloads/sceneaccess/") 162 | schedule2 = watch_directory_56,10,10,(cat,"load.start=",(cfg.watch),"/efectodoppler/*.torrent,d.directory.set=/downloads/efectodoppler/") 163 | schedule2 = watch_directory_57,10,10,(cat,"load.start=",(cfg.watch),"/musicvids/*.torrent,d.directory.set=/downloads/musicvids/") 164 | schedule2 = watch_directory_58,10,10,(cat,"load.start=",(cfg.watch),"/apollo/*.torrent,d.directory.set=/downloads/apollo/") 165 | schedule2 = watch_directory_59,10,10,(cat,"load.start=",(cfg.watch),"/passtheheadphones/*.torrent,d.directory.set=/downloads/passtheheadphones/") 166 | schedule2 = watch_directory_60,10,10,(cat,"load.start=",(cfg.watch),"/notwhatcd/*.torrent,d.directory.set=/downloads/notwhatcd/") 167 | 168 | # Close torrents when diskspace is low 169 | schedule2 = monitor_diskspace, 15, 60, ((close_low_diskspace,1000M)) 170 | 171 | # Move finished (no need Autotools/Automove plugin on ruTorrent) 172 | #method.insert = d.move_to_complete, simple, "d.directory.set=$argument.1=; execute=mkdir,-p,$argument.1=; execute=mv,-u,$argument.0=,$argument.1=; d.save_full_session=" 173 | #method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.custom1=" 174 | 175 | # Commit session data 176 | schedule2 = session_save, 240, 300, ((session.save)) 177 | 178 | # Erase data when torrent deleted (no need erasedata plugin on ruTorrent) 179 | #method.set_key = event.download.erased,delete_erased,"execute=rm,-rf,--,$d.data_path=" 180 | 181 | # Telegram Notifications (independent from rTelegram) 182 | #method.set_key = event.download.finished,notify_me,"execute=/config/rtorrent/notify_telegram.sh,$d.name=" 183 | 184 | # rTelegram Notifications (Uncomment if you have rTelegram variables) 185 | #method.set_key = event.download.finished, log_completed, \ 186 | "execute.nothrow = sh, -c, \"echo >> /config/log/rtelegram/rtelegram_completed.log \\\"$0\\\"\", $d.name=" 187 | 188 | # 189 | # PyroScope SETTINGS 190 | # 191 | method.insert = cfg.pyroscope, private|const|string, (cat,"/config/.pyroscope/") 192 | 193 | # `system.has` polyfill (the "false=" silences the `catch` command, in rTorrent-PS) 194 | catch = {"false=", "method.redirect=system.has,false"} 195 | 196 | # Set "pyro.extended" to 1 to activate rTorrent-PS features! 197 | # (the automatic way used here only works with rTorrent-PS builds after 2018-05-30) 198 | method.insert = pyro.extended, const|value, (system.has, rtorrent-ps) 199 | 200 | # Set "pyro.bin_dir" to the "bin" directory where you installed the pyrocore tools! 201 | # Make sure you end it with a "/"; if this is left empty, then the shell's path is searched. 202 | method.insert = pyro.bin_dir, string|const, /config/bin/ 203 | 204 | # Remove the ".default" if you want to change something (else your changes 205 | # get over-written on update, when you put them into ``*.default`` files). 206 | #import = ~/.pyroscope/rtorrent-pyro.rc.default 207 | #execute.throw = (cat,(pyro.bin_dir),pyroadmin),-q,--create-import,(cat,(cfg.pyroscope),"rtorrent.d/*.rc") 208 | import = (cat,(cfg.pyroscope),"rtorrent.d/.import.rc") 209 | 210 | # TORQUE: Daemon watchdog schedule 211 | # Must be activated by touching the "~/.pyroscope/run/pyrotorque" file! 212 | # Set the second argument to "-v" or "-q" to change log verbosity. 213 | schedule = pyro_watchdog,30,300,"pyro.watchdog=~/.pyroscope," 214 | -------------------------------------------------------------------------------- /root/defaults/rutorrent-conf/config.php: -------------------------------------------------------------------------------- 1 | rtorrent link through unix domain socket 34 | // (scgi_local in rtorrent conf file), change variables 35 | // above to something like this: 36 | // 37 | $scgi_port = 0; 38 | $scgi_host = "unix:////run/php/.rtorrent.sock"; 39 | 40 | $XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!! 41 | 42 | $pathToExternals = array( 43 | "php" => '/usr/bin/php7', // Something like /usr/bin/php. If empty, will be found in PATH. 44 | "curl" => '/usr/local/bin/curl', // Something like /usr/bin/curl. If empty, will be found in PATH. 45 | "gzip" => '/usr/bin/gzip', // Something like /usr/bin/gzip. If empty, will be found in PATH. 46 | "id" => '/usr/bin/id', // Something like /usr/bin/id. If empty, will be found in PATH. 47 | "stat" => '/bin/stat', // Something like /usr/bin/stat. If empty, will be found in PATH. 48 | "pgrep" => '/usr/bin/pgrep', 49 | "python" => '/usr/bin/python3', 50 | ); 51 | 52 | $localhosts = array( // list of local interfaces 53 | "127.0.0.1", 54 | "localhost", 55 | ); 56 | 57 | $profilePath = '/config/rutorrent/profiles'; // Path to user profiles 58 | $profileMask = 0777; // Mask for files and directory creation in user profiles. 59 | // Both Webserver and rtorrent users must have read-write access to it. 60 | // For example, if Webserver and rtorrent users are in the same group then the value may be 0770. 61 | 62 | $tempDirectory = '/config/rutorrent/profiles/tmp/'; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used. 63 | 64 | $canUseXSendFile = true; // Use X-Sendfile feature if it exist 65 | 66 | $locale = "UTF8"; 67 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/10-wait-for-network: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # Sanitize variables 4 | SANED_VARS=( WAIT_NETWORK ) 5 | for i in "${WAIT_NETWORK[@]}" 6 | do 7 | export echo "$i"="${!i//\"/}" 8 | export echo "$i"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')" 9 | done 10 | 11 | if [ "$WAIT_NETWORK" == "yes" ] 12 | then 13 | attempt=0 14 | while [ $attempt -le 59 ]; do 15 | attempt=$(( $attempt + 1 )) 16 | echo "Waiting for github.com to be reachable (attempt: $attempt)..." 17 | result=$(curl https://github.com) 18 | if grep -q 'GitHub: Where the world builds software' <<< $result ; then 19 | echo "GitHub is reachable! Continuing..." 20 | break 21 | fi 22 | sleep 2 23 | done 24 | fi 25 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/20-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # Sanitize variables 4 | SANED_VARS=( CREATE_SUBDIR_BY_TRACKERS SSL_ENABLED) 5 | for i in "${SANED_VARS[@]}" 6 | do 7 | export echo "$i"="${!i//\"/}" 8 | export echo "$i"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')" 9 | done 10 | 11 | if [ "$CREATE_SUBDIR_BY_TRACKERS" == "yes" ] 12 | then 13 | # make folders 14 | mkdir -p \ 15 | /config{/log/nginx,/log/rtorrent,/log/rutorrent,/log/rtelegram,/nginx,/nginx/conf.d,/php,/rtorrent/rtorrent_sess,/rutorrent/settings/users,/.irssi} \ 16 | /config/rutorrent/profiles{/settings,/torrents,/users,/tmp} \ 17 | /downloads/{bajaunapeli,bitspyder,torrentfactory,hachede,hdcity,learnflakes,puntotorrent,tbplus,waffles,xbytes,otros,pedros,cinemaggedon,torrentland,tunetraxx,brokenstones,32pages,lztr,p2pelite,bitgamer,psytorrents,pleasuredome,hdspain,iptorrents,trancetraffic,morethantv,passthepopcorn,gp32spain,gazellegames,opencd,mteam,retrowithin,divteam,racingforme,bibliotik,beyondhd,myanonamouse,ultimategamer,x264,awesomehd,broadcasthenet,bitme,theplace,theshow,thegeeks,thevault,theempire,theoccult,torrentleech,hdbits,zonaq,torrentech,sceneaccess,efectodoppler,musicvids,apollo,passtheheadphones,notwhatcd} \ 18 | /downloads/watch/{bajaunapeli,bitspyder,torrentfactory,hachede,hdcity,learnflakes,puntotorrent,tbplus,waffles,xbytes,otros,pedros,cinemaggedon,torrentland,tunetraxx,brokenstones,32pages,lztr,p2pelite,bitgamer,psytorrents,pleasuredome,hdspain,iptorrents,trancetraffic,morethantv,passthepopcorn,gp32spain,gazellegames,opencd,mteam,retrowithin,divteam,racingforme,bibliotik,beyondhd,myanonamouse,ultimategamer,x264,awesomehd,broadcasthenet,bitme,theplace,theshow,thegeeks,thevault,theempire,theoccult,torrentleech,hdbits,zonaq,torrentech,sceneaccess,efectodoppler,musicvids,apollo,passtheheadphones,notwhatcd} \ 19 | /run{/nginx,/php} \ 20 | /var/lib/nginx/tmp/client_body 21 | else 22 | # make folders (Original) 23 | mkdir -p \ 24 | /config{/log/nginx,/log/rtorrent,/log/rutorrent,/log/rtelegram,/nginx,/nginx/conf.d,/php,/rtorrent/rtorrent_sess,/rutorrent/settings/users,.irssi} \ 25 | /config/rutorrent/profiles{/settings,/torrents,/users,/tmp} \ 26 | /downloads{/completed,/watch} \ 27 | /run{/nginx,/php} \ 28 | /var/lib/nginx/tmp/client_body 29 | fi 30 | 31 | # copy config 32 | PREV_DIR=$(pwd) 33 | 34 | cd /defaults/rutorrent-conf || exit 35 | shopt -s globstar nullglob 36 | for i in * 37 | do 38 | [[ ! -e "/config/rutorrent/settings/${i}" ]] && cp -v "${i}" "/config/rutorrent/settings/${i}" 39 | done 40 | 41 | cd "${PREV_DIR}" || exit 42 | 43 | [[ ! -e /config/nginx/nginx.conf ]] && \ 44 | if [ "$SSL_ENABLED" == "yes" ] 45 | then 46 | cp /defaults/nginx_ssl.conf /config/nginx/nginx.conf 47 | else 48 | cp /defaults/nginx.conf /config/nginx/nginx.conf 49 | fi 50 | [[ ! -e /config/nginx/.htpasswd ]] && \ 51 | cp /defaults/.htpasswd /config/nginx/.htpasswd 52 | 53 | [[ ! -e /config/rtorrent/rtorrent.rc ]] && \ 54 | cp /defaults/rtorrent.rc /config/rtorrent/rtorrent.rc 55 | 56 | if [ "$ENABLE_PYROSCOPE" == "yes" ] && [ ! -e /config/rtorrent/rtorrent.rc ] 57 | then 58 | cp /defaults/rtorrent.rc.pyroscope /config/rtorrent/rtorrent.rc 59 | fi 60 | 61 | cp -pr /config/rutorrent/settings/* /usr/share/webapps/rutorrent/conf/ 62 | 63 | if [ ! -e "/config/php/php.ini" ]; then 64 | cp /etc/php7/php.ini /config/php/php.ini 65 | sed -i -e 's/\(register_argc_argv .*=\).*/\1 On/g' /config/php/php.ini 66 | fi 67 | 68 | 69 | cp /config/php/php.ini /etc/php7/php.ini 70 | 71 | # create symlink for webui files 72 | [[ ! -e /var/www/localhost/rutorrent ]] && ln -s \ 73 | /usr/share/webapps/rutorrent /var/www/localhost/rutorrent 74 | 75 | # delete lock file if exists 76 | [[ -e /config/rtorrent/rtorrent_sess/rtorrent.lock ]] && \ 77 | rm /config/rtorrent/rtorrent_sess/rtorrent.lock 78 | 79 | if [ "$CREATE_SUBDIR_BY_TRACKERS" == "yes" ] 80 | then 81 | # permissions 82 | chown abc:abc \ 83 | /downloads \ 84 | /downloads/watch/{bajaunapeli,bitspyder,torrentfactory,hachede,hdcity,learnflakes,puntotorrent,tbplus,waffles,xbytes,otros,pedros,cinemaggedon,torrentland,tunetraxx,brokenstones,32pages,lztr,p2pelite,bitgamer,psytorrents,pleasuredome,hdspain,iptorrents,trancetraffic,morethantv,passthepopcorn,gp32spain,gazellegames,opencd,mteam,retrowithin,divteam,racingforme,bibliotik,beyondhd,myanonamouse,ultimategamer,x264,awesomehd,broadcasthenet,bitme,theplace,theshow,thegeeks,thevault,theempire,theoccult,torrentleech,hdbits,zonaq,torrentech,sceneaccess,efectodoppler,musicvids,apollo,passtheheadphones,notwhatcd} \ 85 | /downloads/{bajaunapeli,bitspyder,torrentfactory,hachede,hdcity,learnflakes,puntotorrent,tbplus,waffles,xbytes,otros,pedros,cinemaggedon,torrentland,tunetraxx,brokenstones,32pages,lztr,p2pelite,bitgamer,psytorrents,pleasuredome,hdspain,iptorrents,trancetraffic,morethantv,passthepopcorn,gp32spain,gazellegames,opencd,mteam,retrowithin,divteam,racingforme,bibliotik,beyondhd,myanonamouse,ultimategamer,x264,awesomehd,broadcasthenet,bitme,theplace,theshow,thegeeks,thevault,theempire,theoccult,torrentleech,hdbits,zonaq,torrentech,sceneaccess,efectodoppler,musicvids,apollo,passtheheadphones,notwhatcd} 86 | else 87 | # permissions 88 | chown abc:abc \ 89 | /downloads \ 90 | /downloads/watch/ \ 91 | /downloads/completed/ 92 | fi 93 | 94 | chown -R abc:abc \ 95 | /config \ 96 | /run \ 97 | /usr/share/webapps/rutorrent \ 98 | /var/lib/nginx \ 99 | /var/www/localhost/rutorrent 100 | 101 | chmod -R 755 /config/rutorrent/profiles 102 | chmod 644 /etc/logrotate.d/* 103 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/30-getautodl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | # create .autodl config dir and link 3 | [[ ! -d /config/.autodl ]] && (mkdir /config/.autodl && chown -R abc:abc /config/.autodl) 4 | [[ ! -d /home/abc ]] && (mkdir /home/abc && chown -R abc:abc /home/abc) 5 | 6 | # get rutorrent plugin 7 | #[[ ! -d /usr/share/webapps/rutorrent/plugins/autodl-irssi/.git ]] && (git clone https://github.com/autodl-community/autodl-rutorrent.git /usr/share/webapps/rutorrent/plugins/autodl-irssi && \ 8 | [[ ! -d /usr/share/webapps/rutorrent/plugins/autodl-irssi/.git ]] && (git clone https://github.com/stickz/autodl-rutorrent.git /usr/share/webapps/rutorrent/plugins/autodl-irssi && \ 9 | cd /usr/share/webapps/rutorrent/plugins/autodl-irssi && \ 10 | git checkout ruTorrentFixes && \ 11 | chown -R abc:abc /usr/share/webapps/rutorrent/plugins/autodl-irssi/) 12 | 13 | # get autodl script for irssi 14 | [[ ! -d /config/.irssi/scripts/.git ]] && (mkdir -p /config/.irssi/scripts && \ 15 | git clone https://github.com/autodl-community/autodl-irssi.git /config/.irssi/scripts && \ 16 | mkdir /config/.irssi/scripts/autorun && \ 17 | ln -s /config/.irssi/scripts/autodl-irssi.pl /config/.irssi/scripts/autorun/autodl-irssi.pl && \ 18 | chown -R abc:abc /config/.irssi ) 19 | 20 | # get updated trackers for irssi-autodl 21 | wget --quiet -O /tmp/trackers.zip https://github.com/autodl-community/autodl-trackers/archive/master.zip && \ 22 | [[ ! -d /config/.irssi/scripts/AutodlIrssi/trackers ]] && mkdir -p /config/.irssi/scripts/AutodlIrssi/trackers && \ 23 | cd /config/.irssi/scripts/AutodlIrssi/trackers && \ 24 | unzip -q -o -j /tmp/trackers.zip && \ 25 | rm /tmp/trackers.zip 26 | 27 | # update rutorrent plugin 28 | cd /usr/share/webapps/rutorrent/plugins/autodl-irssi/ || exit 29 | git pull 30 | chown -R abc:abc /usr/share/webapps/rutorrent/plugins/autodl-irssi 31 | 32 | # make sure perl is in irssi startup 33 | echo "load perl" > /config/.irssi/startup 34 | 35 | # symlink autodl/irssi folders to root 36 | ln -s /config/.autodl /root/.autodl 37 | ln -s /config/.irssi /root/.irssi 38 | chown -R abc:abc /root/.autodl 39 | chown -R abc:abc /root/.irssi 40 | 41 | # update autodl script for irssi 42 | cd /config/.irssi/scripts || exit 43 | git pull 44 | chown -R abc:abc /config/.irssi 45 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/40-ssl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # Sanitize variables 4 | SANED_VARS=( SSL_ENABLED ) 5 | for i in "${SANED_VARS[@]}" 6 | do 7 | export echo "$i"="${!i//\"/}" 8 | export echo "$i"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')" 9 | done 10 | 11 | if [ "$SSL_ENABLED" == "yes" ] 12 | then 13 | DH="/config/nginx/dh.pem" 14 | DH_SIZE="2048" 15 | 16 | if [ ! -e "$DH" ] 17 | then 18 | echo ">> seems like the first start of nginx" 19 | echo ">> doing some preparations..." 20 | echo "" 21 | 22 | echo ">> generating $DH with size: $DH_SIZE" 23 | libressl dhparam -out "$DH" $DH_SIZE 24 | fi 25 | 26 | 27 | if [ ! -e "/config/nginx/cert.pem" ] || [ ! -e "/config/nginx/key.pem" ] 28 | then 29 | echo ">> generating self signed cert" 30 | libressl req -x509 -newkey rsa:4086 \ 31 | -subj "/C=XX/ST=XXXX/L=XXXX/O=XXXX/CN=localhost" \ 32 | -keyout "/config/nginx/key.pem" \ 33 | -out "/config/nginx/cert.pem" \ 34 | -days 825 -nodes -sha256 35 | fi 36 | 37 | if [ ! -e "/config/nginx/conf.d/basic.conf" ] || [ ! -e "/config/nginx/conf.d/ssl.conf" ] 38 | then 39 | cp /defaults/conf.d/* /config/nginx/conf.d/ 40 | fi 41 | else 42 | exit 0 43 | fi 44 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/50-setconf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # make folders 4 | mkdir -p /config/tmp /detach_sess 5 | 6 | # copy config files/set links etc... 7 | [[ ! -L /home/abc/.autodl ]] && ln -s /config/.autodl /home/abc/.autodl 8 | [[ ! -L /config/.irssi/scripts/autorun/autodl-irssi.pl ]] && ln -s /config/.irssi/scripts/autodl-irssi.pl /config/.irssi/scripts/autorun/autodl-irssi.pl 9 | [[ ! -f /config/.irssi/config ]] && cp /defaults/config.irssi /config/.irssi/config 10 | [[ ! -f /config/.autodl/autodl.cfg ]] && cp /defaults/autodl.cfg /config/.autodl/autodl.cfg 11 | [[ ! -f /usr/share/webapps/rutorrent/plugins/autodl-irssi/conf.php ]] && cp /defaults/conf.php /usr/share/webapps/rutorrent/plugins/autodl-irssi/conf.php 12 | 13 | # set perms 14 | chown abc:abc -R /config /detach_sess 15 | chown abc:abc -R /usr/share/webapps/rutorrent 16 | chown abc:abc /downloads 17 | chmod 755 /usr/local/bin/curl 18 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/60-pyroscope: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | usermod -s /bin/bash abc 4 | # Sanitize variables 5 | SANED_VARS=( ENABLE_PYROSCOPE ) 6 | for i in "${ENABLE_PYROSCOPE[@]}" 7 | do 8 | export echo "$i"="${!i//\"/}" 9 | export echo "$i"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')" 10 | done 11 | 12 | if [ "$ENABLE_PYROSCOPE" == "yes" ] 13 | then 14 | # make folders 15 | if [[ ! -d /config/.pyroscope ]];then 16 | su -c "mkdir -p /config/.pyroscope" abc 17 | su -c "mkdir -p ~/bin ~/.local" abc 18 | su -c 'git clone "https://github.com/pyroscope/pyrocore.git" ~/.local/pyroscope' abc 19 | su -c "echo 'export PYRO_CONFIG_DIR=/config/.pyroscope' >> ~/.profile" abc 20 | su -c "echo 'export PATH=$PATH:~/bin' >> ~/.profile" abc 21 | su -c '~/.local/pyroscope/update-to-head.sh' abc 22 | su - -c '/config/bin/pyroadmin --create-config' abc 23 | su -c 'rm /config/.pyroscope/config.ini' abc 24 | su -c 'touch ~/.pyroscope/run/pyrotorque' abc 25 | su -c 'touch ~/.bash_completion' abc 26 | su -c 'grep /\.pyroscope/ ~/.bash_completion >/dev/null || echo >> /config/.bash_completion ". ~/.pyroscope/bash-completion.default"' abc 27 | su -c '. ~/.bash_completion' abc 28 | su -c "find /config/.pyroscope -type f |xargs sed -i 's/\~\//\/config\//g'" abc 29 | fi 30 | 31 | [[ ! -e /config/.pyroscope/config.ini ]] && \ 32 | cp /defaults/config.ini /config/.pyroscope/config.ini 33 | 34 | # permissions 35 | chown -R abc:abc /config/.pyroscope 36 | fi 37 | -------------------------------------------------------------------------------- /root/etc/logrotate.d/nginx: -------------------------------------------------------------------------------- 1 | /config/log/nginx/*.log { 2 | daily 3 | rotate 7 4 | compress 5 | nodateext 6 | notifempty 7 | missingok 8 | sharedscripts 9 | postrotate 10 | s6-svc -h /var/run/s6/services/nginx 11 | endscript 12 | } 13 | -------------------------------------------------------------------------------- /root/etc/php7/php-fpm.d/rutorrent.conf: -------------------------------------------------------------------------------- 1 | [rutorrent] 2 | user = abc 3 | group = abc 4 | listen = /run/php/php-fpm-rutorrent.sock 5 | listen.owner = abc 6 | listen.group = abc 7 | listen.mode = 0660 8 | pm = static 9 | pm.max_children = 2 10 | pm.start_servers = 2 11 | pm.min_spare_servers = 1 12 | pm.max_spare_servers = 3 13 | chdir = / 14 | -------------------------------------------------------------------------------- /root/etc/services.d/cron/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | /usr/sbin/crond -f -S -l 0 -c /etc/crontabs 4 | -------------------------------------------------------------------------------- /root/etc/services.d/fpm/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | /usr/sbin/php-fpm7 -FR -y /etc/php7/php-fpm.d/rutorrent.conf 3 | 4 | -------------------------------------------------------------------------------- /root/etc/services.d/irssi/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | #screen -D -m -S \ 3 | # irssi s6-setuidgid abc /usr/bin/irssi \ 4 | # --home=/config/.irssi 5 | # 6 | #sleep 1s 7 | if [ -f "/detach_sess/.irssi" ]; then 8 | rm -f /detach_sess/.irssi || true 9 | sleep 1s 10 | fi 11 | 12 | HOME=/config;dtach -n /detach_sess/.irssi s6-setuidgid abc /usr/bin/irssi --home=/config/.irssi 1>/dev/null 13 | 14 | sleep 1s 15 | -------------------------------------------------------------------------------- /root/etc/services.d/nginx/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | exec /usr/sbin/nginx -c /config/nginx/nginx.conf 3 | -------------------------------------------------------------------------------- /root/etc/services.d/rtelegram/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | if [ "${RT_TOKEN}" != "" ] && [ "${RT_MASTERS}" != "" ];then 4 | sleep 10 5 | su abc -c "/usr/bin/rtelegram -token=${RT_TOKEN} -masters=${RT_MASTERS} -url=/run/php/.rtorrent.sock -logfile=/config/log/rtelegram/rtelegram.log -completed-torrents-logfile=/config/log/rtelegram/rtelegram_completed.log" 6 | fi 7 | -------------------------------------------------------------------------------- /root/etc/services.d/rutorrent/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | if [ -f "/detach_sess/.rtorrent" ]; then 4 | rm -f /detach_sess/.rtorrent || true 5 | sleep 1s 6 | fi 7 | 8 | dtach -n /detach_sess/.rtorrent \ 9 | s6-setuidgid abc /usr/local/bin/rtorrent \ 10 | -n -o import=/config/rtorrent/rtorrent.rc 11 | 12 | until [ -e "/config/rtorrent/rtorrent_sess/rtorrent.lock" ]; 13 | do 14 | sleep 1s 15 | done 16 | 17 | rtorrent_pid=$(< /config/rtorrent/rtorrent_sess/rtorrent.lock | cut -d '+' -f 2) 18 | tail -n 1 -f /config/log/rtorrent/rtorrent.log "$rtorrent_pid" 19 | -------------------------------------------------------------------------------- /root/usr/share/webapps/rutorrent/plugins/filemanager/conf.php: -------------------------------------------------------------------------------- 1 | config 17 | $config['archive']['type'] = [ 18 | // 'rar' => [ 'bin' =>'rar', 19 | // 'compression' => range(0, 5), 20 | // ], 21 | 'zip' => [ 22 | 'bin' =>'unzip', 23 | 'compression' => ['-0', '-1', '-9'], 24 | ], 25 | 'tar' => [ 26 | 'bin' =>'tar', 27 | 'compression' => [0, 'gzip', 'bzip2'], 28 | ] 29 | ]; 30 | -------------------------------------------------------------------------------- /root/usr/share/webapps/rutorrent/plugins/showip/init.php: -------------------------------------------------------------------------------- 1 | registerPlugin($plugin["name"],$pInfo["perms"]); 7 | $jResult .= "plugin.ip = ".escapeshellarg($ip)."; plugin.lan_ip = ".escapeshellarg($lan_ip).";"; 8 | } 9 | else 10 | $jResult .= "plugin.disable();"; 11 | -------------------------------------------------------------------------------- /root/usr/share/webapps/rutorrent/plugins/theme/conf.php: -------------------------------------------------------------------------------- 1 |