forked from bestlibre/hassio-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG BUILD_FROM | ||
FROM $BUILD_FROM | ||
|
||
ARG BUILD_VERSION | ||
ARG BUILD_ARCH | ||
|
||
# Add env | ||
ENV LANG C.UTF-8 | ||
|
||
# Setup base | ||
RUN apk add --no-cache -U --virtual .build-deps \ | ||
git \ | ||
&& apk add --no-cache -U aria2 darkhttpd \ | ||
&& git clone https://github.com/ziahamza/webui-aria2.git /webui-aria2 \ | ||
&& rm -rf /webui-aria2/.git \ | ||
&& rm -rf /webui-aria2/screenshots \ | ||
&& rm -rf /webui-aria2/*.md \ | ||
&& rm -rf /webui-aria2/Dockerfile* \ | ||
&& rm -rf /webui-aria2/node-server.js \ | ||
&& apk del .build-deps | ||
|
||
COPY run.sh / | ||
|
||
RUN chmod a+x /run.sh | ||
|
||
CMD [ "/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# aria2 with webui for hass.io | ||
[![Build Status](https://travis-ci.org/bestlibre/hassio-addons.svg?branch=master)](https://travis-ci.org/bestlibre/hassio-addons)[![](https://images.microbadger.com/badges/version/bestlibre/armhf-aria2.svg)](https://microbadger.com/images/bestlibre/armhf-aria2 "Get your own version badge on microbadger.com") | ||
|
||
## Description | ||
|
||
This addon provide an [aria2](https://aria2.github.io/) with the [webui-aria2](https://github.com/ziahamza/webui-aria2) frontend container for hass.io. | ||
|
||
|
||
## Configuration | ||
To be completed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "Aria2", | ||
"version": "0.1", | ||
"slug": "aria2", | ||
"description": "Aria2 download manager", | ||
"url": "https://github.com/bestlibre/hassio-addons/tree/master/aria2", | ||
"startup": "system", | ||
"boot": "auto", | ||
"image": "bestlibre/{arch}-aria2", | ||
"options": {}, | ||
"schema": {}, | ||
"ports": {"6800/tcp": null, "8080/tcp": null}, | ||
"map": ["share:rw"], | ||
"webui": "http://[HOST]:[PORT:8080]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
secret=$(jq -r '.secret // "123456789"' /data/options.json) | ||
downloads=$(jq -r '.downloads // "/share/aria2/"' /data/options.json) | ||
options=$(jq -r 'if .options then [.options[] | "--"+.name+"="+.value ] | join(" ") else "" end' /data/options.json) | ||
session_file=/data/aria.session.gz | ||
|
||
darkhttpd /webui-aria2 --port 8080 & | ||
|
||
aria2c --enable-rpc --rpc-secret=${secret} --rpc-listen-all --save-session=${session_file} --input-file=${session_file} --save-session-interval=30 --dir=${downloads} ${options} |