Merge branch 'feature/KASM-4367-discord-updates' into 'develop'

Resolve KASM-4367 "Feature/ discord updates"

Closes KASM-4367

See merge request kasm-technologies/internal/workspaces-images!112
This commit is contained in:
Justin Travis 2023-05-03 20:06:00 +00:00
commit 9ce6d727df

View File

@ -1,10 +1,26 @@
#!/usr/bin/env bash
set -ex
apt-get update
# Install Discord from deb
apt-get update
curl -L -o discord.deb "https://discord.com/api/download?platform=linux&format=deb"
apt-get install -y ./discord.deb
rm discord.deb
# Default config values
mkdir -p $HOME/.config/discord/
echo '{"SKIP_HOST_UPDATE": true}' > $HOME/.config/discord/settings.json
# Desktop file setup
sed -i "s@Exec=/usr/share/discord/Discord@Exec=/usr/share/discord/Discord --no-sandbox@g" /usr/share/applications/discord.desktop
cp /usr/share/applications/discord.desktop $HOME/Desktop/
chmod +x $HOME/Desktop/discord.desktop
chmod +x $HOME/Desktop/discord.desktop
# Cleanup
if [ -z ${SKIP_CLEAN+x} ]; then
apt-get autoclean
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
fi