2015-10-24 08:21:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
# For non-interactive install (dpkg)
|
|
|
|
export INITRD=no
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
# Now install all packages we need
|
2015-10-24 08:48:41 +00:00
|
|
|
apt-get update
|
2015-10-24 08:21:16 +00:00
|
|
|
apt-get install -y --no-install-recommends \
|
2015-11-05 03:35:11 +00:00
|
|
|
ca-certificates \
|
2015-10-24 08:21:16 +00:00
|
|
|
blackbox xvfb xdotool \
|
|
|
|
pulseaudio pulseaudio-utils \
|
2015-11-05 03:36:01 +00:00
|
|
|
cmake python-minimal \
|
2015-10-28 22:41:36 +00:00
|
|
|
vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse
|
2015-10-24 08:21:16 +00:00
|
|
|
|
|
|
|
# Configure GUI user, we are going to use the pre-setup "app" user for this
|
|
|
|
mkdir -p /config
|
2015-10-31 23:45:06 +00:00
|
|
|
ln -sf /config ~app/.ts3bot
|
2015-10-24 08:21:16 +00:00
|
|
|
|
|
|
|
# Install TeamSpeak3.
|
|
|
|
# Original comment that used to be here: temporary non-interactive teamspeak3 install hack, remove before publishing!!
|
|
|
|
# In fact, it would be nice if we had some lazy handling code for this that just requires the user to provide a "--agree-with-license" once.
|
|
|
|
cd ~app
|
2015-10-31 23:45:06 +00:00
|
|
|
wget http://dl.4players.de/ts/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run -Ots3client.run
|
2015-10-24 08:21:16 +00:00
|
|
|
chmod +x ./ts3client.run
|
|
|
|
sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run
|
2015-10-31 23:49:37 +00:00
|
|
|
./ts3client.run --quiet --target ts3client
|
2015-10-24 08:21:16 +00:00
|
|
|
rm ./ts3client.run
|
|
|
|
|
2015-11-05 03:03:59 +00:00
|
|
|
# Install TS3Bot via Git
|
|
|
|
npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \
|
2015-11-05 03:56:15 +00:00
|
|
|
npm install --unsafe-perm -g "https://github.com/icedream/ts3bot-control#${TS3BOT_COMMIT}"
|
2015-10-24 08:21:16 +00:00
|
|
|
|
2016-04-09 15:00:08 +00:00
|
|
|
# Fix for youtube-dl
|
|
|
|
chmod a+rx "$(dirname "$(readlink -f "$(which ts3bot)")")/node_modules/youtube-dl/bin/youtube-dl"
|
|
|
|
|
2015-10-24 08:21:16 +00:00
|
|
|
# Clean up APT
|
2015-10-27 23:54:36 +00:00
|
|
|
apt-get autoremove -y --purge wget cmake cmake-data
|
2015-10-24 08:21:16 +00:00
|
|
|
apt-get clean
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|