Skip to content

Commit

Permalink
Updated to v3.3.2
Browse files Browse the repository at this point in the history
Added debug install script.
  • Loading branch information
BeerK0in committed Jun 6, 2017
1 parent 187fe40 commit 96ffda2
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 8 deletions.
118 changes: 118 additions & 0 deletions install-loud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#!/bin/bash

# Set variables
# -----------------------------------
GUNBOT_GITHUB_FOLDER_NAME="Gunbot3.3.2"
GUNBOT_GITHUB_FILE_NAME="GUNBOT_v3.3.2_Poloniex_Bittrex_Patch"


# Set functions
# -----------------------------------
logMessage () {
echo " $1"
echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
}


echo ""
echo " ============================================================"
echo " GUNBOT 3.3.2 SETUP started"
echo ""
echo " This will take a few seconds"
echo ""
echo " DEBUG VERSION WITH A LOT OF OUTPUT"
echo ""
echo " ============================================================"
echo ""

logMessage "(1/6) Update the base system"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
apt update
apt -y upgrade


logMessage "(2/6) Install nodejs 7.x"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curl -sL https://deb.nodesource.com/setup_7.x | bash -
apt -y install nodejs


logMessage "(3/6) Install tools"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
apt -y install unzip
npm install -g pm2 yo generator-gunbot gunbot-monitor


logMessage "(4/6) Install GUNBOT"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wget https://github.com/GuntharDeNiro/BTCT/releases/download/${GUNBOT_GITHUB_FOLDER_NAME}/${GUNBOT_GITHUB_FILE_NAME}.zip -P /opt/
unzip -o /opt/${GUNBOT_GITHUB_FILE_NAME}.zip -d /opt/unzip-tmp

# create folder for the current version.
mkdir /opt/${GUNBOT_GITHUB_FILE_NAME} -p

# Copy only the executables.
cp /opt/unzip-tmp/gunthy-* /opt/${GUNBOT_GITHUB_FILE_NAME}

# creates a symbolic link to the gunbot folder.
rm /opt/gunbot > /dev/null
ln -s /opt/${GUNBOT_GITHUB_FILE_NAME} /opt/gunbot

# Cleanup
rm /opt/${GUNBOT_GITHUB_FILE_NAME}.zip
rm -R /opt/unzip-tmp

# Set rights
chmod +x /opt/gunbot/gunthy-*



logMessage "(5/6) Add GUNBOT aliases"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "" >> ~/.bashrc
echo "# GUNBOT ALIASES" >> ~/.bashrc
echo "alias gcd='cd /opt/gunbot'" >> ~/.bashrc
echo "alias ginit='gcd && yo gunbot init'" >> ~/.bashrc
echo "alias gadd='gcd && yo gunbot add'" >> ~/.bashrc
echo "alias gl='pm2 l'" >> ~/.bashrc
echo "alias glog='pm2 logs'" >> ~/.bashrc
echo "alias gstart='pm2 start'" >> ~/.bashrc
echo "alias gstop='pm2 stop'" >> ~/.bashrc



logMessage "(6/6) Init generator"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Create folder for yeoman.
chmod g+rwx /root
chmod g+rwx /opt/gunbot

# Yeoman write rights.
mkdir /root/.config/configstore -p
cat > /root/.config/configstore/insight-yo.json << EOM
{
"clientId": 1337,
"optOut": true
}
EOM
chmod g+rwx /root/.config
chmod g+rwx /root/.config/configstore
chmod g+rw /root/.config/configstore/*

# pm2 write rights.
mkdir /root/.pm2 -p
echo "1337" > /root/.pm2/touch
chmod g+rwx /root/.pm2
chmod g+rw /root/.pm2/*


echo ""
echo " ============================================================"
echo " GUNBOT SETUP complete!"
echo ""
echo " Please run this command to init the GUNBOT:"
echo " gcd"
echo " ginit"
echo ""
echo " ============================================================"
echo ""
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# Set variables
# -----------------------------------
GUNBOT_GITHUB_FOLDER_NAME="Gunbot3.3SMART"
GUNBOT_GITHUB_FILE_NAME="GUNBOT_V3.3_ALL_OS"
GUNBOT_GITHUB_FOLDER_NAME="Gunbot3.3.2"
GUNBOT_GITHUB_FILE_NAME="GUNBOT_v3.3.2_Poloniex_Bittrex_Patch"


# Set functions
Expand All @@ -16,7 +16,7 @@ logMessage () {

echo ""
echo " ============================================================"
echo " GUNBOT 3.3 SETUP started"
echo " GUNBOT 3.3.2 SETUP started"
echo ""
echo " This will take a few seconds"
echo ""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-gunbot",
"version": "0.1.12",
"version": "0.1.13",
"description": "Setup and manage GUNBOT 3.3 on Linux",
"homepage": "https://github.com/BeerK0in/generator-gunbot",
"author": {
Expand Down
8 changes: 4 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# Set variables
# -----------------------------------
GUNBOT_GITHUB_FOLDER_NAME="Gunbot3.3SMART"
GUNBOT_GITHUB_FILE_NAME="GUNBOT_V3.3_ALL_OS"
GUNBOT_GITHUB_FOLDER_NAME="Gunbot3.3.2"
GUNBOT_GITHUB_FILE_NAME="GUNBOT_v3.3.2_Poloniex_Bittrex_Patch"
TIMESTAMP="$(date +"%s")"
LATEST_PATCH="v3.3GUI"
LATEST_PATCH="v3.3.2 Poloniex Bittrex"

# Set functions
# -----------------------------------
Expand All @@ -17,7 +17,7 @@ logMessage () {

echo ""
echo " ============================================================"
echo " GUNBOT 3.3 UPDATE started"
echo " GUNBOT 3.3.2 UPDATE started"
echo ""
echo " Patch ${LATEST_PATCH}"
echo ""
Expand Down

0 comments on commit 96ffda2

Please sign in to comment.