clean scripts, no longer need preamble

This commit is contained in:
2016-05-14 20:25:27 +01:00
parent 54ab11a689
commit 878ef2ecd9
40 changed files with 60 additions and 294 deletions

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env AUTOMYSQLBACKUP_VERSION_MAJOR 3.0
export_env AUTOMYSQLBACKUP_VERSION_MINOR rc6

View File

@@ -1,13 +1,2 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
## BackInTime
apt_install_permanent backintime-common python-dbus
## Configuration
## Back In Time
apt_install_permanent backintime-common python-dbus

5
build/scripts/btsync.sh Executable file → Normal file
View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Configuration
export_env BTSYNC_CONFIG /host/etc/btsync/btsync.conf
export_env BTSYNC_DATA /host/var/btsync

View File

@@ -1,9 +1,4 @@
#!/bin/bash
set -e
source /build/config
set -x
## Chrome dependencies
## Dependencies
apt_install_permanent gconf-service libasound2 libatk1.0-0 libcairo2 libcap2 libcups2 libcurl3 libfontconfig1 libgdk-pixbuf2.0-0 libgtk2.0-0 libnspr4 libnss3 libpango1.0-0 librtmp0 libxss1 libxtst6 xdg-utils
## Chrome
@@ -11,4 +6,4 @@ mkdir -p /usr/share/icons/hicolor
cd /opt
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb

5
build/scripts/cleanup.sh Executable file → Normal file
View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Remove temporary packages for minimal builds
if [ $MODE == "minimal" ] && [ -f /build/temporary ]; then
cat /build/temporary

View File

@@ -1,7 +1 @@
#!/bin/bash
set -e
source /build/config
set -x
## collectd
apt_install_permanent libsensors4 collectd

6
build/scripts/compile.sh Executable file → Normal file
View File

@@ -1,7 +1 @@
#!/bin/bash
set -e
source /build/config
set -x
## Often used tools
apt_install_temporary build-essential yasm cmake automake autopoint autoconf libtool pkg-config

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env COUCHPOTATO_CONFIG /host/etc/couchpotato/config.ini
export_env COUCHPOTATO_DATA /host/var/lib/couchpotato

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Install cron daemon
apt_install_permanent cron

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Enable multimedia sources in APT
echo 'deb http://www.deb-multimedia.org jessie main non-free' >> /etc/apt/sources.list
echo 'deb-src http://www.deb-multimedia.org jessie main non-free' >> /etc/apt/sources.list

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env FFMPEG_VERSION 2.8.6

5
build/scripts/ftpd.sh Normal file
View File

@@ -0,0 +1,5 @@
## Environment
export_env FTP_DATA /host/var/lib/ftp
## Pure-FTPd
apt_install_permanent pure-ftpd

View File

@@ -1,24 +1,15 @@
#!/bin/bash
set -e
source /build/config
set -x
# GMediaRender dependencies
## GMediaRender dependencies
apt_install_permanent libupnp-dev libgstreamer0.10-dev \
gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly \
gstreamer0.10-ffmpeg \
gstreamer0.10-pulseaudio gstreamer0.10-alsa
# GMediaRender
## GMediaRender
cd opt
git clone https://github.com/hzeller/gmrender-resurrect.git
cd gmrender-resurrect
autoreconf || automake --add-missing
./configure
make
make install
## Runit script
mkdir /etc/service/gmrender
mv /build/runit/gmrender /etc/service/gmrender/run
make install

View File

@@ -1,18 +1,9 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env HAMACHI_DATA /host/var/lib/logmein-hamachi
export_env HAMACHI_VERSION 2.1.0.119
## Hamachi dependency
## Dependencies
apt_install_permanent lsb-core net-tools socat strace
## Hamachi
cd /opt
export HAMACHI_DATA=/host/var/lib/logmein-hamachi
export HAMACHI_VERSION=2.1.0.119
wget -O hamachi.deb https://secure.logmein.com/labs/logmein-hamachi_$HAMACHI_VERSION-1_amd64.deb
mkdir -p /etc/service/hamachi
cp /build/runit/hamachi /etc/service/hamachi/run
## Environment variables
echo -n $HAMACHI_DATA > /etc/container_environment/HAMACHI_DATA
wget -P /opt -O hamachi.deb https://secure.logmein.com/labs/logmein-hamachi_$HAMACHI_VERSION-1_amd64.deb

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env HEADPHONES_CONFIG /host/etc/headphones/config.ini
export_env HEADPHONES_CONFIG_DEFAULT /opt/headphones/config.ini
@@ -10,4 +5,4 @@ export_env HEADPHONES_DATA /host/var/lib/headphones
## Headphones
cd /opt
git clone https://github.com/rembo10/headphones.git
git clone https://github.com/rembo10/headphones.git

1
build/scripts/jekyll.sh Normal file
View File

@@ -0,0 +1 @@
apt_install_permanent make net-tools python3

1
build/scripts/jenkins.sh Normal file
View File

@@ -0,0 +1 @@
apt_install_permanent make net-tools python3

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Configuration
export_env KODI_ROOT /opt/kodi-server
export_env KODI_VERSION 16.0

View File

@@ -1,7 +1 @@
#!/bin/bash
set -e
source /build/config
set -x
## Install
apt_install_permanent texlive-full python-pygments gnuplot

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env PHP_CONFIG /host/etc/php.ini
export_env PHP_FCGI_CONFIG /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
@@ -15,4 +10,4 @@ ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/
cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/
sed -i "s,\(\"PHP_FCGI_CHILDREN\"\s*=>\s*\"\).*$,\1$PHP_FCGI_CHILDREN\"\,," $PHP_FCGI_CONFIG
sed -i "s,\(\"PHP_FCGI_MAX_REQUESTS\"\s*=>\s*\"\).*$,\1$PHP_FCGI_MAX_REQUESTS\"\,," $PHP_FCGI_CONFIG
sed -i "s,\(\"socket\"\),\"host\" => \"127.0.0.1\"\,\n\t\t\"port\" => $PHP_FCGI_PORT\,\n\t\t#\1," $PHP_FCGI_CONFIG
sed -i "s,\(\"socket\"\),\"host\" => \"127.0.0.1\"\,\n\t\t\"port\" => $PHP_FCGI_PORT\,\n\t\t#\1," $PHP_FCGI_CONFIG

7
build/scripts/lighttpd.sh Executable file → Normal file
View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env LIGHTTPD_VERSION_MAJOR 1.4
export_env LIGHTTPD_VERSION_MINOR 39
@@ -35,4 +30,4 @@ if [ $MODE == "minimal" ]; then
cd /opt
rm -r lighttpd-$LIGHTTPD_VERSION
rm lighttpd-$LIGHTTPD_VERSION.tar.gz
fi
fi

View File

@@ -1,31 +1,17 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env MINIDLNA_VERSION 1.1.1
export_env MINIDLNA_CONFIG /host/etc/minidlna.conf
export_env MINIDLNA_LOG /host/var/log/minidlna.log
export_env MINIDLNA_DATA /host/var/lib/minidlna
# MiniDLNA dependencies
## Dependencies
apt_install_permanent gettext libavutil-dev libavcodec-dev libavformat-dev libjpeg-dev libsqlite3-dev libexif-dev libid3tag0-dev libogg-dev libvorbis-dev libFLAC-dev
export MINIDLNA_VERSION=1.1.1
export MINIDLNA_CONFIG=/host/etc/minidlna.conf
export MINIDLNA_LOG=/host/var/log/minidlna.log
export MINIDLNA_DATA=/host/var/lib/minidlna
# MiniDLNA
cd opt
cd /opt
wget http://downloads.sourceforge.net/project/minidlna/minidlna/$MINIDLNA_VERSION/minidlna-$MINIDLNA_VERSION.tar.gz
tar xzf minidlna-$MINIDLNA_VERSION.tar.gz
cd minidlna-$MINIDLNA_VERSION
./configure
make
make install
## Runit script
mkdir /etc/service/minidlna
mv /build/runit/minidlna /etc/service/minidlna/run
## Environment variables
echo -n $MINIDLNA_VERSION > /etc/container_environment/MINIDLNA_VERSION
echo -n $MINIDLNA_CONFIG > /etc/container_environment/MINIDLNA_CONFIG
echo -n $MINIDLNA_LOG > /etc/container_environment/MINIDLNA_LOG
echo -n $MINIDLNA_DATA > /etc/container_environment/MINIDLNA_DATA
make install

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## MySQL
debconf-set-selections <<< 'mariadb-server mariadb-server/root_password password dummy'
debconf-set-selections <<< 'mariadb-server mariadbql-server/root_password_again password dummy'
@@ -21,4 +16,4 @@ tee -a $MYSQL_CONFIG <<EOF
[mysqld]
skip-grant-tables
EOF
EOF

7
build/scripts/php.sh Executable file → Normal file
View File

@@ -1,10 +1,5 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env PHP_VERSION 5.6.20
export_env PHP_VERSION 5.6.21
export_env PHP_CONFIG /usr/local/lib/php.ini
export_env PHP_TIMEZONE Europe/London

7
build/scripts/phpmyadmin.sh Executable file → Normal file
View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## phpMyAdmin
export_env PMA_VERSION 4.6.0
export_env PMA_ROOT /var/www/html
@@ -30,4 +25,4 @@ EOF
if [ $MODE == "minimal" ]; then
cd /opt
rm phpMyAdmin-$PMA_VERSION-all-languages.tar.gz
fi
fi

5
build/scripts/prepare.sh Executable file → Normal file
View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Create directories and files
mkdir /etc/container_environment
mkdir /opt/init.d

View File

@@ -1,10 +1,5 @@
#!/bin/bash
set -e
source /build/config
set -x
## Pulseaudio
apt_install_permanent pulseaudio
## Setup environment
## Configuration
sed -i "1iexport PULSE_SERVER=host" /root/.profile

View File

@@ -1,45 +1,21 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env REDIS_CONFIG=/etc/redis/redis.conf
export_env REDIS_LOG=/host/var/log/redis/redis.log
export_env REDIS_DATA=/host/var/lib/redis
export_env REDIS_VERSION=stable
## Redis
## Redis (repository)
apt_install_permanent redis-server
export REDIS_CONFIG=/etc/redis/redis.conf
export REDIS_LOG=/host/var/log/redis/redis.log
export REDIS_DATA=/host/var/lib/redis
## Reds (compile)
cd /opt
wget http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz
tar xzf redis-$REDIS_VERSION.tar.gz
cd redis-$REDIS_VERSION
make
## Configuration
mkdir -p `dirname $REDIS_CONFIG`
sed -i "s,^\(daemonize\s*\).*$,\1no," $REDIS_CONFIG
sed -i "s,^\(logfile\s*\).*$,\1$REDIS_LOG," $REDIS_CONFIG
sed -i "s,^\(dir\s*\).*$,\1$REDIS_DATA," $REDIS_CONFIG
## Runit script
mkdir /etc/service/redis
mv /build/runit/redis /etc/service/redis/run
## Environment variables
echo -n $REDIS_CONFIG > /etc/container_environment/REDIS_CONFIG
echo -n $REDIS_LOG > /etc/container_environment/REDIS_LOG
echo -n $REDIS_DATA > /etc/container_environment/REDIS_DATA
## TODO
# ENV REDIS_VERSION stable
# RUN cd /opt && \
# wget http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz && \
# tar xzf redis-$REDIS_VERSION.tar.gz && \
# cd redis-$REDIS_VERSION && \
# make
# RUN chmod +x /opt/redis-$REDIS_VERSION/src/redis-server
# ENV REDIS_CONFIG /etc/redis/redis-server.conf
# ENV REDIS_LOG /host/var/log/redis/redis-server.log
# ENV REDIS_DATA /host/var/lib/redis
# RUN mkdir -p `dirname $REDIS_CONFIG`
# RUN cp /opt/redis-$REDIS_VERSION/redis.conf $REDIS_CONFIG
# RUN sed -i "s,^\(logfile\s*\).*$,\1$REDIS_LOG," $REDIS_CONFIG
# RUN sed -i "s,^\(dir\s*\).*$,\1$REDIS_DATA," $REDIS_CONFIG
sed -i "s,^\(dir\s*\).*$,\1$REDIS_DATA," $REDIS_CONFIG

View File

@@ -1,7 +1 @@
#!/bin/bash
set -e
source /build/config
set -x
## Install runit
apt_install_permanent runit
apt_install_permanent runit

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env RAR_VERSION 4.1.1
export_env SABNZBD_CONFIG /host/etc/sabnzbd/sabnzbd.ini

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env SICKBEARD_CONFIG /host/etc/sickbeard/config.ini
export_env SICKBEARD_DATA /host/var/lib/sickbeard

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
export_env SONARR_DATA /host/var/lib/sonarr

View File

@@ -1,9 +1,4 @@
#!/bin/bash
set -e
source /build/config
set -x
## Install the SSH server
## Install OpenSSH
apt_install_permanent openssh-server
mkdir /var/run/sshd

View File

@@ -1,9 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Subliminal
pip install git+git://github.com/Diaoul/subliminal.git
cat << EOF > /opt/subliminal
#!/bin/bash

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Configuration
export_env SYNCTHING_CONFIG /host/etc/syncthing
export_env SYNCTHING_VERSION 0.12.20

View File

@@ -1,9 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Install a syslog daemon
apt_install_permanent syslog-ng-core
mkdir -p /var/lib/syslog-ng
sed -i "s/^\(#SYSLOGNG_OPTS=\).*$/\1\"--no-caps --default-modules=affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat\"/" /etc/default/syslog-ng
sed -i "s/^\(#SYSLOGNG_OPTS=\).*$/\1\"--no-caps --default-modules=affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat\"/" /etc/default/syslog-ng

View File

@@ -1,14 +1,9 @@
#!/bin/bash
set -e
source /build/config
set -x
## Transmission
apt_install_permanent transmission-daemon jq
## Environment
export_env TRANSMISSION_CONFIG /host/etc/transmission
export_env TRANSMISSION_TORRENTS /host/srv/torrents
export_env TRANSMISSION_DOWNLOAD /host/tmp/downloads
export_env TRANSMISSION_COMPLETE /host/srv/downloads
export_env TRANSMISSION_LOG /host/var/log/transmission/error.log
export_env TRANSMISSION_LOG /host/var/log/transmission/error.log
## Transmission
apt_install_permanent transmission-daemon jq

View File

@@ -1,24 +1,11 @@
#!/bin/bash
set -e
source /build/config
set -x
## UPnP Proxy dependency
## Dependency
apt_install_permanent uuid-dev
## UPnP Proxy
cd opt
cd /opt
git clone git://git.savannah.nongnu.org/upnpproxy.git
cd upnpproxy
autoreconf || automake --add-missing
./configure
make
make install
## Runit script
mkdir /etc/service/upnpproxy
mv /build/runit/upnpproxy /etc/service/upnpproxy/run
## Environment variables
export UPNPPROXY_CONFIG=/host/etc/upnpproxy.conf
echo -n $UPNPPROXY_CONFIG > /etc/container_environment/UPNPPROXY_CONFIG
make install

7
build/scripts/utilities.sh Executable file → Normal file
View File

@@ -1,10 +1,5 @@
#!/bin/bash
set -e
source /build/config
set -x
## Often used tools
apt_install_permanent psmisc wget curl python-pip git gawk zip gperf unzip bzip2 inetutils-ping inetutils-telnet rsync
## Often used python modules
pip install argparse
pip install argparse

View File

@@ -1,8 +1,3 @@
#!/bin/bash
set -e
source /build/config
set -x
## Environment
import_env LIGHTTPD_CONFIG
export_env LIGHTTPD_DOMAINS /host/etc/lighttpd