git.iko.soy/xmrig-bash-scripts
on a30c429 help sign in
3 files changed+19−33
since splitsnapshots
unifiedsplit
install.sh+11 settings.sh+1−1 start.sh+7−32
install.sh+11
@@ -30,27 +30,38 @@ fi
3030
3131# Load functions
3232. functions.sh
33+sleep 5
3334
3435# Get settings
3536. settings.sh
37+sleep 5
3638
3739# Update system
3840. maintenance.sh
41+sleep 5
3942
4043# Install dependencies
4144. depends.sh
45+sleep 5
4246
4347# User input
4448. input.sh
49+sleep 5
4550
4651# Stop running instance
4752. stop.sh
4853
4954# Get source and build by sourcing our build file
5055. build.sh
56+sleep 5
5157
5258# Create a config.json
5359. config.sh
60+sleep 5
61+
62+# Setup crontab for user
63+. crontab.sh
64+sleep 5
5465
5566# Unset REPO variable so start script will execute program
5667SCREEN=""
settings.sh+1−1
@@ -46,7 +46,7 @@ _OPENCL_CACHE="true"
4646_OPENCL_LOADER='null'
4747_OPENCL_PLATFORM="AMD"
4848
49−_DONATE_LEVEL="0"
49+_DONATE_LEVEL="5"
5050
5151_DONATE_OVER_PROXY="1"
5252
start.sh+7−32
@@ -10,46 +10,21 @@ echo "${_GREEN}MINING STARTED${_RESET}"
1010. functions.sh
1111. settings.sh
1212
13−# if ! screen -list | grep -q "$_XMRIG_SCREEN"; then
13+if ! screen -list | grep -q "$_XMRIG_SCREEN"; then
1414
1515 # Call functions
1616 show_settings
1717 show_mysettings
18− # start_xmrig
18+ start_xmrig
1919
2020 # List screen
21− # screen -ls
22−# else
21+ screen -ls
22+else
2323
2424 # List screen
25− # screen -ls
26−
27−# fi
28−echo "[Unit]" | sudo tee /etc/systemd/system/xmrig.service
29−echo "Description=XMRIG service" | sudo tee -a /etc/systemd/system/xmrig.service
30−echo "After=network.target" | sudo tee -a /etc/systemd/system/xmrig.service
31−echo "StartLimitIntervalSec=0" | sudo tee -a /etc/systemd/system/xmrig.service
32−echo "[Service]" | sudo tee -a /etc/systemd/system/xmrig.service
33−echo "Type=simple" | sudo tee -a /etc/systemd/system/xmrig.service
34−echo "Restart=always" | sudo tee -a /etc/systemd/system/xmrig.service
35−echo "RestartSec=3" | sudo tee -a /etc/systemd/system/xmrig.service
36−echo "User=root" | sudo tee -a /etc/systemd/system/xmrig.service
37−echo "ExecStart=$_XMRIG_BUILD_LOCATION/xmrig --config=$_XMRIG_CONFIG_LOCATION" | sudo tee -a /etc/systemd/system/xmrig.service
38−echo "" | sudo tee -a /etc/systemd/system/xmrig.service
39−echo "[Install]" | sudo tee -a /etc/systemd/system/xmrig.service
40−echo "WantedBy=multi-user.target" | sudo tee -a /etc/systemd/system/xmrig.service
41−
42−echo "STARTING XMRIG/SERVICES"
43−
44−sudo service logrotate start
45−sudo service ntp start
46−sudo service xmrig start
47−
48−echo "STARTING XMRIG/SERVICES @ BOOT"
49−
50−sudo systemctl enable logrotate
51−sudo systemctl enable ntp
52−sudo systemctl enable xmrig
25+ screen -ls
26+
27+fi
5328
5429echo "${_CYAN}MINING RUNNING${_RESET}"
5530echo "${_YELLOW} The process is running in a screen session."