git.iko.soy/xmrig-bash-scripts
on master help sign in
2 files changed+19−26
since splitsnapshots
unifiedsplit
install.sh−7 start.sh+19−19
install.sh−7
@@ -30,34 +30,27 @@ fi
3030
3131# Load functions
3232. functions.sh
33−sleep 5
3433
3534# Get settings
3635. settings.sh
37−sleep 5
3836
3937# Update system
4038. maintenance.sh
41−sleep 5
4239
4340# Install dependencies
4441. depends.sh
45−sleep 5
4642
4743# User input
4844. input.sh
49−sleep 5
5045
5146# Stop running instance
5247. stop.sh
5348
5449# Get source and build by sourcing our build file
5550. build.sh
56−sleep 5
5751
5852# Create a config.json
5953. config.sh
60−sleep 5
6154
6255# Unset REPO variable so start script will execute program
6356SCREEN=""
start.sh+19−19
@@ -25,31 +25,31 @@ echo "${_GREEN}MINING STARTED${_RESET}"
2525 # screen -ls
2626
2727# fi
28−echo "[Unit]" | tee /etc/systemd/system/xmrig.service
29−echo "Description=XMRIG service" | tee -a /etc/systemd/system/xmrig.service
30−echo "After=network.target" | tee -a /etc/systemd/system/xmrig.service
31−echo "StartLimitIntervalSec=0" | tee -a /etc/systemd/system/xmrig.service
32−echo "[Service]" | tee -a /etc/systemd/system/xmrig.service
33−echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
34−echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
35−echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
36−echo "User=root" | tee -a /etc/systemd/system/xmrig.service
37−echo "ExecStart=$(pwd)/xmrig --config=$_XMRIG_CONFIG_LOCATION" | tee -a /etc/systemd/system/xmrig.service
38−echo "" | tee -a /etc/systemd/system/xmrig.service
39−echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
40−echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
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
4141
4242echo "STARTING XMRIG/SERVICES"
4343
44−service logrotate start
45−service ntp start
46−service xmrig start
44+sudo service logrotate start
45+sudo service ntp start
46+sudo service xmrig start
4747
4848echo "STARTING XMRIG/SERVICES @ BOOT"
4949
50−systemctl enable logrotate
51−systemctl enable ntp
52−systemctl enable xmrig
50+sudo systemctl enable logrotate
51+sudo systemctl enable ntp
52+sudo systemctl enable xmrig
5353
5454echo "${_CYAN}MINING RUNNING${_RESET}"
5555echo "${_YELLOW} The process is running in a screen session."