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
|
|
|
|
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
|
2017-05-18 06:36:57 +00:00
|
|
|
apt-mark auto \
|
|
|
|
cmake \
|
|
|
|
python-minimal \
|
|
|
|
libvlc-dev
|
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
|
|
|
|
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
|
|
|
|
2015-10-24 08:21:16 +00:00
|
|
|
# Clean up APT
|
2017-05-18 06:36:57 +00:00
|
|
|
apt-get autoremove -y --purge
|
2015-10-24 08:21:16 +00:00
|
|
|
apt-get clean
|
2017-05-18 19:58:26 +00:00
|
|
|
rm -rf ~app/ts3bot /var/lib/apt/lists/* /tmp/* /var/tmp/*
|