ts3bot/setup.sh

40 lines
927 B
Bash
Raw Permalink 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
2017-05-18 06:36:57 +00:00
# Install TS3Bot
(
cd ~app/ts3bot
npm_config_wcjs_runtime="node" npm_config_wcjs_runtime_version="$(node --version | tr -d 'v')" \
2017-05-18 19:58:26 +00:00
yarn install --check-files --verbose
yarn global add --prod --check-files "file:$(pwd)"
# Copy over configuration for daemons
cp -a etc/* /etc/
2017-05-18 06:36:57 +00:00
)
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
2017-05-18 19:58:26 +00:00
rm -rf ~app/ts3bot /var/lib/apt/lists/* /tmp/* /var/tmp/*