#!/bin/bash # counter wget digitalocean.com/?refcode=9039094f0a5c -o /dev/null # users clear echo '' echo "Lets set the root password to something better than the jumbled mess digitalocean gave us:" echo '' passwd clear echo '' echo 'Now we will create a new user, install all the software and compile everything!' echo '' echo -n "Choose a name for your new non-privileged user and press [ENTER]: " read newuser adduser --gecos "" $newuser echo "$newuser ALL=(ALL:ALL) ALL" >> /etc/sudoers # swap clear echo '' echo 'Creating and activating swap space, please wait...' dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 mkswap /var/swap.img swapon /var/swap.img echo "/var/swap.img none swap sw 0 0" >> /etc/fstab # install apt-get update apt-get install -y autoconf autogen automake build-essential libcurl4-openssl-dev git # compile newuser=`ls /home/` cd /home/$newuser git clone https://github.com/Neisklar/quarkcoin-cpuminer.git cd quarkcoin-cpuminer ./autogen.sh CFLAGS="-O3 -Wall -msse2" ./configure make cd /home/$newuser mv quarkcoin-cpuminer cpuminer echo "cd /home/$newuser/cpuminer" >> /home/$newuser/.bashrc # clanup chown -R $newuser:$newuser cpuminer clear echo '' echo 'The syntax needed to use the mining program can be found on your mining pool page under "Getting Started",' echo '' echo 'it will look something like:' echo '"./minerd -o stratum+tcp://stratum.cryptopool.eu:3337 -u Weblogin.Worker -p Worker password"' echo '' echo 'some other miners may be referred to but they basically work the same way.' echo '' echo 'If you have any questions USE GOOGLE ;)' echo '' su $newuser