I can start it with:
Code: Select all
cd /root/xmr-stak-cpu/bin
./xmr-stak-cpu
Code: Select all
CTL+Z
bg %*
I'll take either solution. Running on boot or shifting it into the background.
Can someone point me into the correct direction? thank you.
Code: Select all
cd /root/xmr-stak-cpu/bin
./xmr-stak-cpu
Code: Select all
CTL+Z
bg %*
Doing this now.jlehtone wrote:Create a systemd unit for your service.
I added a user, xmrjlehtone wrote:Create a systemd unit for your service.
Code: Select all
[root@miner01 system]# cat xmr.service
[Unit]
Description: XMR-STAK-CPU MINING
After=network.target
[Service]
Type=simple
User=xmr
ExecStart=/root/xmr-stak-cpu/bin/xmr-stak-cpu -s
Restart=on-abort
[Install]
WantedBy=multi-user.target
Code: Select all
[root@miner01 system]# -l
-bash: -l: command not found
[code]
[root@miner01 ~]# systemctl status xmr.service -l
● xmr.service
Loaded: error (Reason: Bad message)
Active: inactive (dead)
Dec 12 15:00:13 miner01 systemd[1]: [/etc/systemd/system/xmr.service:2] Missing '='.
Dec 12 15:00:36 miner01 systemd[1]: [/etc/systemd/system/xmr.service:2] Missing '='.
Error message: Line 2 does not have an equal sign.supertight wrote:I'm not sure what I'm doing wrong.Code: Select all
[/etc/systemd/system/xmr.service:2] Missing '='.
Yes,supertight wrote:Code: Select all
# cat xmr.service [Unit] Description: XMR-STAK-CPU MINING
Code: Select all
Description: XMR-STAK-CPU MINING
ugh, I should have been able to deduce that. I'll put on my yellow cone hat and sit in the corner.jlehtone wrote:Error message: Line 2 does not have an equal sign.supertight wrote:I'm not sure what I'm doing wrong.Code: Select all
[/etc/systemd/system/xmr.service:2] Missing '='.
Yes,supertight wrote:Code: Select all
# cat xmr.service [Unit] Description: XMR-STAK-CPU MINING
does not have '='.Code: Select all
Description: XMR-STAK-CPU MINING
Now I'm getting.jlehtone wrote:Error message: Line 2 does not have an equal sign.supertight wrote:I'm not sure what I'm doing wrong.Code: Select all
[/etc/systemd/system/xmr.service:2] Missing '='.
Yes,supertight wrote:Code: Select all
# cat xmr.service [Unit] Description: XMR-STAK-CPU MINING
does not have '='.Code: Select all
Description: XMR-STAK-CPU MINING
Code: Select all
[root@miner01 system]# systemctl status xmr.service -l
● xmr.service - XMR-STAK-CPU MINING
Loaded: loaded (/etc/systemd/system/xmr.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-12-12 20:05:13 MST; 1min 17s ago
Process: 2926 ExecStart=/root/xmr-stak-cpu/bin/xmr-stak-cpu -s (code=exited, status=203/EXEC)
Main PID: 2926 (code=exited, status=203/EXEC)
Dec 12 20:05:13 miner01 systemd[1]: Started XMR-STAK-CPU MINING.
Dec 12 20:05:13 miner01 systemd[1]: Starting XMR-STAK-CPU MINING...
Dec 12 20:05:13 miner01 systemd[2926]: Failed at step EXEC spawning /root/xmr-stak-cpu/bin/xmr-stak-cpu: Permission denied
Dec 12 20:05:13 miner01 systemd[1]: xmr.service: main process exited, code=exited, status=203/EXEC
Dec 12 20:05:13 miner01 systemd[1]: Unit xmr.service entered failed state.
Dec 12 20:05:13 miner01 systemd[1]: xmr.service failed.
Code: Select all
● xmr.service - XMR-STAK-CPU MINING
Loaded: loaded (/etc/systemd/system/xmr.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Dec 12 20:59:56 miner01 systemd[1]: Started XMR-STAK-CPU MINING.
Dec 12 20:59:56 miner01 systemd[1]: Starting XMR-STAK-CPU MINING...
Dec 12 20:59:56 miner01 xmr-stak-cpu[1203]: [2017-12-12 20:59:56] : Failed to open config file config.txt.
Dec 12 21:32:33 miner01 systemd[1]: Started XMR-STAK-CPU MINING.
Dec 12 21:32:33 miner01 systemd[1]: Starting XMR-STAK-CPU MINING...
Dec 12 21:32:33 miner01 xmr-stak-cpu[1425]: [2017-12-12 21:32:33] : Failed to open config file config.txt.
SELinux is disabled. Checking log.tunk wrote:Could be caused by selinux, you may find some info in /var/log/messages.
Code: Select all
Dec 12 21:32:33 miner01 xmr-stak-cpu: [2017-12-12 21:32:33] : Failed to open config file config.txt.