Initial Upload
This commit is contained in:
commit
918584358d
7 changed files with 387 additions and 0 deletions
34
Dockerfile
Executable file
34
Dockerfile
Executable file
|
@ -0,0 +1,34 @@
|
|||
FROM phusion/baseimage:0.9.16
|
||||
MAINTAINER smdion <me@seandion.com>
|
||||
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV HOME /root
|
||||
ENV TERM screen
|
||||
|
||||
# Use baseimage-docker's init system
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
# Install Dependencies
|
||||
RUN apt-get update -q && \
|
||||
apt-get install -qy git python wget && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/* && \
|
||||
mkdir /opt/headphones
|
||||
|
||||
#Volumes and Ports
|
||||
EXPOSE 8181
|
||||
VOLUME /config
|
||||
VOLUME /downloads
|
||||
VOLUME /music
|
||||
|
||||
#Adding Custom files
|
||||
ADD init/ /etc/my_init.d/
|
||||
ADD services/ /etc/service/
|
||||
ADD files/ /files/
|
||||
RUN chmod -v +x /etc/service/*/run
|
||||
RUN chmod -v +x /etc/my_init.d/*.sh
|
||||
|
||||
#Adduser
|
||||
RUN useradd -u 911 -U -s /bin/false abc
|
||||
RUN usermod -G users abc
|
||||
|
||||
|
50
README.md
Executable file
50
README.md
Executable file
|
@ -0,0 +1,50 @@
|
|||

|
||||
|
||||
The [LinuxServer.io](http://linuxserver.io) team brings you another quality container release featuring auto-update on startup, easy user mapping and community support. Be sure to checkout our [forums](http://forum.linuxserver.io) or for real-time support our [IRC](http://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`.
|
||||
|
||||
# linuxserver/Headphones
|
||||

|
||||
|
||||
Headphones is an automated music downloader for NZB and Torrent, written in Python. It supports SABnzbd, NZBget, Transmission, µTorrent and Blackhole.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
docker create --name="Headphones" -v /path/to/headphones/data:/config -v /path/to/downloads:/downloads -v /path/to/music:/music -v /etc/localtime:/etc/localtime:ro -p 8181:8181 linuxserver/docker-headphones
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `-p 8181` - the port(s)
|
||||
* `-v /etc/localhost` for timesync - *optional*
|
||||
* `-v /config` - Configuration file location
|
||||
* `-v /music` - Location of music. (i.e. /opt/downloads/music or /var/music)
|
||||
* `-v /downloads` - Location of downloads folder
|
||||
* `-e PGID` for for GroupID - see below for explanation - *optional*
|
||||
* `-e PUID` for for UserID - see below for explanation - *optional*
|
||||
|
||||
It is based on phusion-baseimage with ssh removed, for shell access whilst the container is running do `docker exec -it Headphones /bin/bash`.
|
||||
|
||||
### User / Group Identifiers
|
||||
|
||||
**TL;DR** - The `PGID` and `PUID` values set the user / group you'd like your container to 'run as' to the host OS. This can be a user you've created or even root (not recommended).
|
||||
|
||||
Part of what makes our containers work so well is by allowing you to specify your own `PUID` and `PGID`. This avoids nasty permissions errors with relation to data volumes (`-v` flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers.
|
||||
|
||||
## Setting up the application
|
||||
|
||||
Access WebUI at http://localhost:8181 and walk through the wizard.
|
||||
|
||||
## Updates
|
||||
|
||||
* Upgrade to the latest version simply `docker restart Headphones`.
|
||||
* To monitor the logs of the container in realtime `docker logs -f Headphones`.
|
||||
|
||||
|
||||
**Credits**
|
||||
|
||||
* smdion <smdion@gmail.com>
|
||||
|
||||
**Versions**
|
||||
|
||||
* 1.0
|
275
files/config.ini
Normal file
275
files/config.ini
Normal file
|
@ -0,0 +1,275 @@
|
|||
[General]
|
||||
nzb_downloader = 0
|
||||
cue_split = 1
|
||||
libraryscan = 1
|
||||
music_encoder = 0
|
||||
open_magnet_links = 0
|
||||
preferred_quality = 0
|
||||
customport = 5000
|
||||
download_scan_interval = 5
|
||||
preferred_bitrate = ""
|
||||
destination_dir = ""
|
||||
encodervbrcbr = cbr
|
||||
xldprofile = ""
|
||||
delete_lossless_files = 1
|
||||
encoderquality = 2
|
||||
autowant_all = 0
|
||||
ignored_words = ""
|
||||
freeze_db = 0
|
||||
encoder_multicore_count = 0
|
||||
keep_torrent_files = 0
|
||||
http_root = /
|
||||
download_dir = ""
|
||||
http_proxy = 0
|
||||
launch_browser = 1
|
||||
http_username = ""
|
||||
lossless_destination_dir = ""
|
||||
mb_ignore_age = 365
|
||||
file_underscores = 0
|
||||
cue_split_flac_path = ""
|
||||
lossless_bitrate_from = 0
|
||||
do_not_override_git_branch = 0
|
||||
include_extras = 0
|
||||
samplingfrequency = 44100
|
||||
http_host = 0.0.0.0
|
||||
album_art_format = folder
|
||||
encoder_path = ""
|
||||
hpuser = ""
|
||||
detect_bitrate = 0
|
||||
enable_https = 0
|
||||
check_github = 1
|
||||
custompass = ""
|
||||
mirror = musicbrainz.org
|
||||
api_enabled = 0
|
||||
correct_metadata = 0
|
||||
customuser = ""
|
||||
cue_split_shntool_path = ""
|
||||
lastfm_username = ""
|
||||
autowant_upcoming = 1
|
||||
config_version = 5
|
||||
check_github_interval = 360
|
||||
customauth = 0
|
||||
file_permissions = 0644
|
||||
prefer_torrents = 0
|
||||
encoderoutputformat = mp3
|
||||
search_interval = 1440
|
||||
preferred_bitrate_low_buffer = 0
|
||||
ignore_clean_releases = 0
|
||||
http_password = ""
|
||||
usenet_retention = 1500
|
||||
add_album_art = 0
|
||||
headphones_indexer = 0
|
||||
wait_until_release_date = 0
|
||||
rename_files = 0
|
||||
file_format = $Track $Artist - $Album [$Year] - $Title
|
||||
customhost = localhost
|
||||
interface = default
|
||||
folder_format = $Artist/$Album [$Year]
|
||||
move_files = 0
|
||||
cleanup_files = 0
|
||||
replace_existing_folders = 0
|
||||
preferred_bitrate_allow_lossless = 0
|
||||
embed_album_art = 0
|
||||
check_github_on_startup = 1
|
||||
http_port = 8181
|
||||
download_torrent_dir = ""
|
||||
folder_permissions = 0755
|
||||
official_releases_only = 0
|
||||
magnet_links = 0
|
||||
log_dir = /config/logs
|
||||
update_db_interval = 24
|
||||
git_path = ""
|
||||
required_words = ""
|
||||
advancedencoder = ""
|
||||
numberofseeders = 10
|
||||
torrentblackhole_dir = ""
|
||||
cache_dir = /config/cache
|
||||
blackhole = 0
|
||||
libraryscan_interval = 300
|
||||
keep_nfo = 0
|
||||
preferred_bitrate_high_buffer = 0
|
||||
https_cert = /config/server.crt
|
||||
hppass = ""
|
||||
customsleep = 1
|
||||
api_key = ""
|
||||
encoderlossless = 1
|
||||
torrent_downloader = 0
|
||||
torrent_removal_interval = 720
|
||||
blackhole_dir = ""
|
||||
keep_original_folder = 0
|
||||
extras = ""
|
||||
autowant_manually_added = 1
|
||||
encoder_multicore = 0
|
||||
encoderfolder = ""
|
||||
preferred_words = ""
|
||||
https_key = /config/server.key
|
||||
encoder = ffmpeg
|
||||
git_user = rembo10
|
||||
bitrate = 192
|
||||
music_dir = ""
|
||||
auto_add_artists = 1
|
||||
git_branch = master
|
||||
embed_lyrics = 0
|
||||
lossless_bitrate_to = 0
|
||||
[Growl]
|
||||
growl_enabled = 0
|
||||
growl_onsnatch = 0
|
||||
growl_host = ""
|
||||
growl_password = ""
|
||||
[Subsonic]
|
||||
subsonic_host = ""
|
||||
subsonic_password = ""
|
||||
subsonic_enabled = 0
|
||||
subsonic_username = ""
|
||||
[Waffles]
|
||||
waffles_passkey = ""
|
||||
waffles = 0
|
||||
waffles_uid = ""
|
||||
waffles_ratio = ""
|
||||
[Email]
|
||||
email_onsnatch = 0
|
||||
email_smtp_password = ""
|
||||
email_tls = 0
|
||||
email_smtp_port = 25
|
||||
email_smtp_server = ""
|
||||
email_enabled = 0
|
||||
email_smtp_user = ""
|
||||
email_ssl = 0
|
||||
email_to = ""
|
||||
email_from = ""
|
||||
[Plex]
|
||||
plex_token = ""
|
||||
plex_client_host = ""
|
||||
plex_notify = 0
|
||||
plex_update = 0
|
||||
plex_username = ""
|
||||
plex_password = ""
|
||||
plex_server_host = ""
|
||||
plex_enabled = 0
|
||||
[Old Piratebay]
|
||||
oldpiratebay = 0
|
||||
oldpiratebay_ratio = ""
|
||||
oldpiratebay_url = ""
|
||||
[Pushover]
|
||||
pushover_apitoken = ""
|
||||
pushover_onsnatch = 0
|
||||
pushover_enabled = 0
|
||||
pushover_keys = ""
|
||||
pushover_priority = 0
|
||||
[NZBget]
|
||||
nzbget_priority = 0
|
||||
nzbget_password = ""
|
||||
nzbget_host = ""
|
||||
nzbget_category = ""
|
||||
nzbget_username = nzbget
|
||||
[NZBsorg]
|
||||
nzbsorg_hash = ""
|
||||
nzbsorg = 0
|
||||
nzbsorg_uid = ""
|
||||
[NMA]
|
||||
nma_priority = 0
|
||||
nma_onsnatch = 0
|
||||
nma_apikey = ""
|
||||
nma_enabled = 0
|
||||
[Advanced]
|
||||
verify_ssl_cert = 1
|
||||
ignored_files = ,
|
||||
journal_mode = wal
|
||||
album_completion_pct = 80
|
||||
ignored_folders = ,
|
||||
cache_sizemb = 32
|
||||
[Newznab]
|
||||
newznab = 0
|
||||
newznab_apikey = ""
|
||||
newznab_enabled = 1
|
||||
extra_newznabs = ,
|
||||
newznab_host = ""
|
||||
[Prowl]
|
||||
prowl_onsnatch = 0
|
||||
prowl_enabled = 0
|
||||
prowl_priority = 0
|
||||
prowl_keys = ""
|
||||
[Twitter]
|
||||
twitter_prefix = Headphones
|
||||
twitter_enabled = 0
|
||||
twitter_username = ""
|
||||
twitter_password = ""
|
||||
twitter_onsnatch = 0
|
||||
[SABnzbd]
|
||||
sab_category = ""
|
||||
sab_password = ""
|
||||
sab_host = ""
|
||||
sab_username = ""
|
||||
sab_apikey = ""
|
||||
[Songkick]
|
||||
songkick_apikey = nd1We7dFW2RqxPw8
|
||||
songkick_location = ""
|
||||
songkick_enabled = 1
|
||||
songkick_filter_enabled = 0
|
||||
[uTorrent]
|
||||
utorrent_password = ""
|
||||
utorrent_host = ""
|
||||
utorrent_username = ""
|
||||
utorrent_label = ""
|
||||
[LMS]
|
||||
lms_enabled = 0
|
||||
lms_host = ""
|
||||
[PushBullet]
|
||||
pushbullet_deviceid = ""
|
||||
pushbullet_apikey = ""
|
||||
pushbullet_enabled = 0
|
||||
pushbullet_onsnatch = 0
|
||||
[Pushalot]
|
||||
pushalot_enabled = 0
|
||||
pushalot_onsnatch = 0
|
||||
pushalot_apikey = ""
|
||||
[Kat]
|
||||
kat_ratio = ""
|
||||
kat = 0
|
||||
kat_proxy_url = ""
|
||||
[Piratebay]
|
||||
piratebay_ratio = ""
|
||||
piratebay = 0
|
||||
piratebay_proxy_url = ""
|
||||
[MPC]
|
||||
mpc_enabled = 0
|
||||
[XBMC]
|
||||
xbmc_username = ""
|
||||
xbmc_host = ""
|
||||
xbmc_enabled = 0
|
||||
xbmc_update = 0
|
||||
xbmc_password = ""
|
||||
xbmc_notify = 0
|
||||
[Beets]
|
||||
idtag = 0
|
||||
[Rutracker]
|
||||
rutracker_user = ""
|
||||
rutracker_ratio = ""
|
||||
rutracker = 0
|
||||
rutracker_password = ""
|
||||
[Boxcar]
|
||||
boxcar_onsnatch = 0
|
||||
boxcar_enabled = 0
|
||||
boxcar_token = ""
|
||||
[Transmission]
|
||||
transmission_password = ""
|
||||
transmission_username = ""
|
||||
transmission_host = ""
|
||||
[Mininova]
|
||||
mininova = 0
|
||||
mininova_ratio = ""
|
||||
[OSX_Notify]
|
||||
osx_notify_enabled = 0
|
||||
osx_notify_app = /Applications/Headphones
|
||||
osx_notify_onsnatch = 0
|
||||
[What.cd]
|
||||
whatcd_password = ""
|
||||
whatcd_username = ""
|
||||
whatcd = 0
|
||||
whatcd_ratio = ""
|
||||
[Synoindex]
|
||||
synoindex_enabled = 0
|
||||
[omgwtfnzbs]
|
||||
omgwtfnzbs = 0
|
||||
omgwtfnzbs_uid = ""
|
||||
omgwtfnzbs_apikey = ""
|
13
init/01_new_user.sh
Executable file
13
init/01_new_user.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! "$(id -u abc)" -eq "$PUID" ]; then usermod -u "$PUID" abc ; fi
|
||||
if [ ! "$(id -g abc)" -eq "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
|
||||
|
||||
echo "
|
||||
-----------------------------------
|
||||
GID/UID
|
||||
-----------------------------------
|
||||
User uid: $(id -u abc)
|
||||
User gid: $(id -g abc)
|
||||
-----------------------------------
|
||||
"
|
9
init/20_update.sh
Executable file
9
init/20_update.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
if [ ! -d /opt/headphones/.git ]; then
|
||||
git clone https://github.com/rembo10/headphones.git /opt/headphones
|
||||
else
|
||||
cd /opt/headphones
|
||||
git checkout master
|
||||
fi
|
||||
chown -R abc:abc /opt/headphones
|
||||
chown -R abc:abc /config
|
3
services/headphones/run
Executable file
3
services/headphones/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec /sbin/setuser abc python /opt/headphones/Headphones.py -p 8181 --datadir=/config --nolaunch
|
3
services/tail/run
Executable file
3
services/tail/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec /sbin/setuser abc tail -F /config/logs/headphones.log
|
Loading…
Add table
Reference in a new issue