ts3bot/setup.sh

51 lines
1.4 KiB
Bash
Raw Normal View History

#!/bin/sh
set -ex
# For non-interactive install (dpkg)
export INITRD=no
export DEBIAN_FRONTEND=noninteractive
# Now install all packages we need
apt-get install -y --no-install-recommends \
2015-11-05 03:35:11 +00:00
ca-certificates \
blackbox xvfb xdotool \
pulseaudio pulseaudio-utils \
cmake python-minimal \
vlc-nox '^libvlc[0-9]+$' libvlc-dev vlc-plugin-pulse
2017-05-18 06:36:57 +00:00
apt-mark auto \
cmake \
python-minimal \
libvlc-dev
# Configure GUI user, we are going to use the pre-setup "app" user for this
mkdir -p /config
ln -sf /config ~app/.ts3bot
# 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.
2017-05-18 06:36:57 +00:00
(
cd ~app
wget "http://teamspeak.gameserver.gamed.de/ts3/releases/${TS3CLIENT_VERSION}/TeamSpeak3-Client-linux_amd64-${TS3CLIENT_VERSION}.run" -Ots3client.run
chmod +x ./ts3client.run
sed -i 's/^MS_PrintLicense$/#MS_PrintLicense/g' ./ts3client.run
./ts3client.run --quiet --target ts3client
rm ./ts3client.run
)
# Install TS3Bot
(
cd ~app/ts3bot
npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \
yarn global add --prod --check-files --verbose file:$(pwd)
)
2016-04-09 15:00:08 +00:00
# Clean up APT
2017-05-18 06:36:57 +00:00
apt-get autoremove -y --purge
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2017-05-18 06:36:57 +00:00
# Copy over configuration for daemons
cp -a etc/* /etc/