lolminer_autostart.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. function autoroot_ {
  3. if [ ! -d /home/wareck/.config/autostart ]
  4. then
  5. echo -e "$(tput setaf 10)\nInit install & autostart :$(tput sgr0)"
  6. mkdir /home/wareck/.config/autostart
  7. fi
  8. if [ ! -f /home/wareck/.config/autostart/lolminer.desktop ]
  9. then
  10. cat <<'EOF'>> /home/wareck/.config/autostart/lolminer.desktop
  11. [Desktop Entry]
  12. # VERSION=3.36.2
  13. Name=Terminal
  14. Comment=Use the command line
  15. Keywords=shell;prompt;command;commandline;cmd;
  16. TryExec=gnome-terminal
  17. Exec=gnome-terminal -- bash -c "sudo /home/wareck/miners/lolminer/./lolMiner --algo ETHASH --pool ethash.unmineable.com --port 3333 --user SHIB:0x345b006F98a231cD846f6a8a8151F9999bBD2f2A.nzxt --worker Rig1 --pass x --ethstratum ETHPROXY"
  18. Icon=org.gnome.Terminal
  19. Type=Application
  20. Categories=GNOME;GTK;System;TerminalEmulator;
  21. StartupNotify=true
  22. X-GNOME-SingleWindow=false
  23. OnlyShowIn=GNOME;Unity;
  24. Actions=new-window;preferences;
  25. X-Ubuntu-Gettext-Domain=gnome-terminal
  26. [Desktop Action new-window]
  27. Name=New Window
  28. Exec=gnome-terminal --window
  29. [Desktop Action preferences]
  30. Name=Preferences
  31. Exec=gnome-terminal --preferences
  32. EOF
  33. chmod +x /home/wareck/.config/autostart/lolminer.desktop
  34. fi
  35. if ! grep "wareck" /etc/sudoers >/dev/null
  36. then
  37. sudo sh -c "echo \"wareck ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
  38. echo "Done"
  39. fi
  40. }
  41. autoroot_