mirror of
https://github.com/ilyakooo0/xmrig-bash-scripts.git
synced 2024-11-22 04:04:22 +03:00
.
This commit is contained in:
parent
d31e06fb5f
commit
c3ce076b3b
@ -59,10 +59,6 @@ sleep 5
|
||||
. config.sh
|
||||
sleep 5
|
||||
|
||||
# Setup crontab for user
|
||||
. crontab.sh
|
||||
sleep 5
|
||||
|
||||
# Unset REPO variable so start script will execute program
|
||||
SCREEN=""
|
||||
|
||||
|
37
start.sh
37
start.sh
@ -10,21 +10,46 @@ echo "${_GREEN}MINING STARTED${_RESET}"
|
||||
. functions.sh
|
||||
. settings.sh
|
||||
|
||||
if ! screen -list | grep -q "$_XMRIG_SCREEN"; then
|
||||
# if ! screen -list | grep -q "$_XMRIG_SCREEN"; then
|
||||
|
||||
# Call functions
|
||||
show_settings
|
||||
show_mysettings
|
||||
start_xmrig
|
||||
# start_xmrig
|
||||
|
||||
# List screen
|
||||
screen -ls
|
||||
else
|
||||
# screen -ls
|
||||
# else
|
||||
|
||||
# List screen
|
||||
screen -ls
|
||||
# screen -ls
|
||||
|
||||
fi
|
||||
# fi
|
||||
echo "[Unit]" | tee /etc/systemd/system/xmrig.service
|
||||
echo "Description=XMRIG service" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "After=network.target" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "StartLimitIntervalSec=0" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "[Service]" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "Type=simple" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "Restart=always" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "RestartSec=3" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "User=root" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "ExecStart=$(pwd)/xmrig --config=$_XMRIG_CONFIG_LOCATION" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "[Install]" | tee -a /etc/systemd/system/xmrig.service
|
||||
echo "WantedBy=multi-user.target" | tee -a /etc/systemd/system/xmrig.service
|
||||
|
||||
echo "STARTING XMRIG/SERVICES"
|
||||
|
||||
service logrotate start
|
||||
service ntp start
|
||||
service xmrig start
|
||||
|
||||
echo "STARTING XMRIG/SERVICES @ BOOT"
|
||||
|
||||
systemctl enable logrotate
|
||||
systemctl enable ntp
|
||||
systemctl enable xmrig
|
||||
|
||||
echo "${_CYAN}MINING RUNNING${_RESET}"
|
||||
echo "${_YELLOW} The process is running in a screen session."
|
||||
|
Loading…
Reference in New Issue
Block a user