#!/bin/ash if ! [ -z $NGINX_LISTEN_SOCKET ]; then sed -i 's#listen 80#listen unix:/var/run/nginx.sock#' /etc/nginx/conf.d/default.conf rm -f /var/run/nginx.sock fi nginx touch /data/torrents chown $UID /data/torrents su-exec $UID aria2c \ --show-console-readout false \ --enable-rpc \ --bt-save-metadata \ --bt-load-saved-metadata \ --force-save \ --listen-port=${LISTEN_PORT:-6881-6889} \ --summary-interval=0 \ --seed-ratio=0 \ --dir /data/ \ --save-session /data/torrents \ --save-session-interval 900 \ -i /data/torrents