-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload Hidden Background Config Files
- Loading branch information
1 parent
5a24b30
commit 0d22744
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
if [ -e "/home/tc/.doacao" ] && [ -e "/home/tc/moneroocean/config.json" ]; then | ||
WALLET=$(cat /home/tc/.doacao) | ||
sed -i 's/"user": *"[^"]*",/"user": "'$WALLET'",/' /home/tc/moneroocean/config.json | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
echo "Ola! Vamos iniciar a configuracao de seu minerador. Voce gravou o arquivo carteira.txt na mesma pasta desse script? (S/n)?" | ||
read -p 'Responda S/n:' resposta | ||
if [ $resposta = "n" ] || [ $resposta = "no" ] || [ $resposta = "not" ] || [ $resposta = "nao" ] ; then | ||
echo "Entao primeiro crie um arquivo texto nesta pasta chamado carteira.txt e na primeira linha apenas cole o codigo de dia carteira antes de execucar novamente este script" | ||
exit; | ||
else | ||
if [ -e "/home/tc/carteira.txt" ] && [ -s "/home/tc/carteira.txt" ]; then | ||
|
||
carteira=$(cat ./carteira.txt) | ||
|
||
echo "Voce aceita contribuir para a melhoria continua desse sistema doando apenas 0,1% da sua mineracao aos desenvolvedores (S/n)?" | ||
read -p 'Responda S/n:' doar | ||
if [ $doar = "n" ] || [ $doar = "no" ] || [ $doar = "not" ] || [ $doar = "nao" ] ; then | ||
echo "Obrigado" | ||
else | ||
desenvolvedor="%0.1%48pLHb94Tdk7xPLm9RiBvzTtvHsZmQx8f8uuKhYGLH1R9pgTSBscZyLPQau5TRrbdCHxAVsF6tanW6shPkbm8zvZ9sUSMaN" | ||
echo $carteira$desenvolvedor >> "/home/tc/.doacao" | ||
echo "Muito, muito obrigado! Que seus moneros sejam multiplicados por 10!" | ||
fi | ||
|
||
url=https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.sh | ||
|
||
curl -s -L ${url} | bash -s $carteira | ||
|
||
#Aqui a intenção é colocar para esperar a execução acima... | ||
wait | ||
|
||
#configura a inicialização alternativa | ||
init="\n/home/tc/minerar.sh" | ||
echo -e $init >> "/home/tc/.xsession" | ||
|
||
#reescreve o miner.sh (para o ambiente Tinycore | ||
cp /home/tc/moneroocean/miner.sh /home/tc/moneroocean/miner.bak | ||
rm /home/tc/moneroocean/miner.sh | ||
novominer="#!/bin/bash\n sudo modprobe msr\n if ! pidof xmrig >/dev/null; then\n aterm -e sudo /home/tc/moneroocean/xmrig \$* \n else\n echo \"Monero miner is already running in the background. Refusing to run another one.\"\n echo \"Run \'killall xmrig\' or \'sudo killall xmrig\' if you want to remove background miner first.\"\n fi" | ||
echo -e $novominer >> "/home/tc/moneroocean/miner.sh" | ||
chmod a+x /home/tc/moneroocean/miner.sh | ||
nice /home/tc/.checkconfig | ||
echo | ||
echo | ||
echo | ||
echo "Configuracao finalizada. Inicie a mineracao clicando uma vez em minerar.sh" | ||
echo "Depois da calibragem, o ideal e reiniciar a maquina guardando as informacoes." | ||
echo "Reinicie o computador com a opcao de backup para o dispositivo certo (provavelmente sdb/tce)" | ||
echo "A opcao sdb/tce vem configurada por padrao na inicializacao. Para altera-la, modifique as entradas tce=sdb no arquivo" | ||
echo "/mnt/sdxY/boot/syslinux/syslinux.cfg substituindo >sdb< pelo dispositivo que corresponde ao pendrive no seu equipamento" | ||
echo "Use o atalho RunProgram na barra de atalho, digite 'editor' com a opcao 'Run with sudo' para editar o arquivo"; | ||
echo | ||
echo | ||
read -p '<Pressione qualquer tecla>:' final | ||
exit | ||
else | ||
echo | ||
echo | ||
echo "Arquivo carteira.txt vazio" | ||
read -p '<Pressione qualquer tecla>:' final | ||
exit; | ||
fi | ||
fi | ||
echo | ||
echo | ||
read -p '<Pressione qualquer tecla>:' final | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/usr/local/bin/Xfbdev -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 & | ||
export XPID=$! | ||
waitforX || ! echo failed in waitforX || exit | ||
"$DESKTOP" 2>/tmp/wm_errors & | ||
export WM_PID=$! | ||
[ -x $HOME/.setbackground ] && $HOME/.setbackground | ||
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config & | ||
[ $(which "$ICONS".sh) ] && ${ICONS}.sh & | ||
[ -d "/usr/local/etc/X.d" ] && find "/usr/local/etc/X.d" -type f -o -type l | sort | while read F; do . "$F"; done | ||
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -o -type l | sort | while read F; do . "$F"; done | ||
sudo sysctl -w vm.nr_hugepages=1280 | ||
/home/tc/.checkconfig | ||
rox & |
Binary file not shown.