Skip to content

Instantly share code, notes, and snippets.

@itsXactlY
Last active July 9, 2022 14:44
Show Gist options
  • Save itsXactlY/12e9960b572c1138f58728e8dd58accf to your computer and use it in GitHub Desktop.
Save itsXactlY/12e9960b572c1138f58728e8dd58accf to your computer and use it in GitHub Desktop.
frosty-debian10-minimal
su -
(confirm root password)
apt update
apt upgrade
apt install curl wget sudo build-essential
add normal user to sudoers
sudo visudo
At the end of the file, add a new line for the normal user.
john ALL=(ALL:ALL) ALL
save
exit (back to normal user)
wget https://gist.githubusercontent.com/itsaLca/12e9960b572c1138f58728e8dd58accf/raw/122f0af2289934b57f9e8c938928a6aa9f29661a/install_debian.sh
chmod +x install_debian.sh
sudo ./install_debian.sh
#/bin/bash
CURRENTPATH=`pwd`
echo "Frostybot install started"
echo "Preparing latest nodejs"
sudo -E curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh >> /tmp/install.log 2>&1
sudo bash nodesource_setup.sh >> /tmp/install.log 2>&1
echo "Updating package manager..."
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical
sudo -E apt-get -qy update >> /tmp/install.log 2>&1
echo "Installing prerequisite packages for Frostybot..."
sudo -E apt-get -qy -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install nodejs jq git sqlite3 >> /tmp/install.log 2>&1
echo "Cloning Frostybot Github repository..."
sudo mkdir -p /usr/local && cd /usr/local/
sudo git clone https://github.com/CryptoMF/frostybot-js.git frostybot-js >> /tmp/install.log 2>&1
echo "Setting permissions..."
cd /usr/local/frostybot-js
sudo chgrp $USER -R /usr/local/frostybot-js >> /tmp/install.log 2>&1
sudo npm install --unsafe-perm >> /tmp/install.log 2>&1
echo "Creating frostybot command shortcut..."
sudo rm -Rf /usr/bin/frostybot
sudo ln -s /usr/local/frostybot-js/frostybot /usr/bin/frostybot >> /tmp/install.log 2>&1
frostybot start
frostybot autostart
cd "$CURRENTPATH" &
echo "Frostybot install completed!"
echo ""
echo "You can start the server using this command: frostybot start"
echo "You can stop the server using this command: frostybot stop"
echo "You can upgrade the server using this command: frostybot upgrade"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment