Import some files and transform to working containers for:

* mysql
* lighttpd (with php and mysql)
* transmission
* sabnzbd
* sickbeard
* couchpotato
* headphones
* btsync
This commit is contained in:
2015-01-14 15:17:36 +00:00
parent ecb0bb0815
commit a307062d5b
81 changed files with 635 additions and 94 deletions

View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -e
/opt/automysqlbackup/automysqlbackup $AUTOMYSQLBACKUP_CONFIG

7
build/boot/btsync.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
if [[ ! -e $BTSYNC_CONFIG ]]; then
mkdir -p `dirname $BTSYNC_CONFIG`
/opt/btsync --dump-sample-config > $BTSYNC_CONFIG
sed -i "s,\(\"listen\"\s*:\).*,\1 \"0.0.0.0:8888\"\,," $BTSYNC_CONFIG
fi

68
build/boot/couchpotato.sh Normal file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
set -e
mkdir -p `dirname $COUCHPOTATO_CONFIG`
if [[ ! -e $COUCHPOTATO_CONFIG ]]; then
cat << EOF > $COUCHPOTATO_CONFIG
[core]
show_wizard = 0
[updater]
enabled = 0
[binsearch]
enabled = 1
[nzbclub]
enabled = 1
[kickasstorrents]
enabled = 1
[thepiratebay]
domain =
enabled = 1
extra_score = 0
seed_time = 40
seed_ratio = 1
[yify]
enabled = 1
[blackhole]
directory = /host/srv/torrents
manual = 0
enabled = 1
use_for = torrent
create_subdir = 0
[sabnzbd]
category = movies
delete_failed = 1
enabled = 1
manual = 0
host = sabnzbd:8083
remove_complete = 1
[transmission]
username = user
manual = 0
enabled = 1
host = transmission:9091
stalled_as_failed = 1
delete_failed = 1
rpc_url = transmission
delete_files = 1
remove_complete = 1
[manage]
cleanup = 1
enabled = 1
library = /host/srv/movies
startup_scan = 1
library_refresh_interval = 0
[renamer]
from = /host/srv/downloads
to = /host/srv/movies
EOF
fi

41
build/boot/headphones.sh Normal file
View File

@@ -0,0 +1,41 @@
#!/bin/bash
set -e
mkdir -p `dirname $HEADPHONES_CONFIG`
mkdir -p `dirname $HEADPHONES_DATA`
if [[ ! -e $HEADPHONES_CONFIG ]]; then
cat << EOF > $HEADPHONES_CONFIG
[General]
cache_dir = /host/var/lib/headphones
music_dir = /host/srv/headphones
destination_dir = /host/srv/headphones
preferred_bitrate = 192
auto_add_artists = 1
correct_metadata = 1
move_files = 1
rename_files = 1
folder_format = $Artist/$Album
file_format = $Artist - $Title
file_underscores = 0
cleanup_files = 1
add_album_art = 1
album_art_format = $Artist - $Album
nzb_downloader = 1
torrent_downloader = 1
download_dir = /host/srv/downloads
autowant_upcoming = 1
torrentblackhole_dir = ""
isohunt = 1
kat = 1
mininova = 1
piratebay = 1
download_torrent_dir = /host/srv/downloads
music_encoder = 1
encoder = ffmpeg
bitrate = 192
samplingfrequency = 44100
[SABnzbd]
sab_host = http://sabnzbd:8080/
[Transmission]
transmission_host = transmission:9091
EOF
fi

View File

@@ -1,4 +1,5 @@
#!/bin/bash
set -e
echo "127.0.0.1 localhost" >> /tmp/hosts
# echo "127.0.0.1 localhost" >> /tmp/hosts
cp /etc/hosts /tmp
echo "$HOST_ADDR host" >> /tmp/hosts

View File

@@ -0,0 +1,5 @@
#!/bin/bash
set -e
if [[ ! -e $PHP_CONFIG ]]; then
cp /usr/local/lib/php.ini $PHP_CONFIG
fi

3
build/boot/phpmyadmin.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -e
sed -i "s,\(\['host'\]\s*=\s*\).*$,\1'$MYSQL_PORT_3306_TCP_ADDR';," $PMA_CONFIG

15
build/boot/sabnzbd.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
mkdir -p `dirname $SABNZBD_CONFIG`
if [[ ! -e $SABNZBD_CONFIG ]]; then
cat << EOF > $SABNZBD_CONFIG
[misc]
log_dir = /host/var/log/sabnzbd
admin_dir = /host/var/lib/sabnzbd/admin
download_dir = /host/tmp/downloads
cache_dir = /host/var/lib/sabnzbd/cache
complete_dir = /host/srv/downloads
auto_browser = 0
[servers]
EOF
fi

28
build/boot/sickbeard.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -e
mkdir -p `dirname $SICKBEARD_CONFIG`
if [[ ! -e $SICKBEARD_CONFIG ]]; then
cat << EOF > $SICKBEARD_CONFIG
[General]
config_version = 6
log_dir = /host/var/log/sickbeard
use_nzbs = 1
use_torrents = 1
nzb_method = sabnzbd
flatten_folders_default = 1
root_dirs = 0|/host/srv/shows
tv_download_dir = /host/srv/downloads
process_automatically = 1
rename_episodes = 1
extra_scripts = /opt/subtitles
[Blackhole]
nzb_dir = ""
torrent_dir = /host/srv/torrents
[SABnzbd]
sab_username = ""
sab_password = ""
sab_apikey = ""
sab_category = tv
sab_host = http://sabnzbd:8080/
EOF
fi

View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -e
mkdir -p $TRANSMISSION_CONFIG
if [[ ! -e $TRANSMISSION_CONFIG ]]; then
cat /etc/transmission-daemon/settings.json |
jq ".[\"download-dir\"] = \"$TRANSMISSION_COMPLETE\"" |
jq ".[\"download-limit\"] = \"$DOCKER_HOME\"" |
jq ".+ {
\"rpc-whitelist-enabled\": false,
\"watch-dir\": \"$TRANSMISSION_TORRENTS\",
\"watch-dir-enabled\": true,
\"incomplete-dir\": \"$TRANSMISSION_DOWNLOAD\",
\"incomplete-dir-enabled\": true,
\"port-forwarding-enabled\": true
}" > $TRANSMISSION_CONFIG/settings.json
fi

6
build/boot/webserver.sh Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
set -e
mkdir -p $LIGHTTPD_DOMAINS
if [[ ! -e $LIGHTTPD_DOMAINS ]]; then
touch $LIGHTTPD_DOMAINS/empty.conf
fi