Automatyzation script

Hello everyone,
I need to create a script that runs the miner at startup. I have no clue what is wrong but I'm getting this error every time when I trie to get it work:
× startMiner.service - Miner.
Loaded: loaded (/etc/systemd/system/startMiner.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2021-06-05 11:21:32 CEST; 15s ago
Process: 6210 ExecStart=/bin/bash /usr/bin/startup.sh (code=exited, status=1/FAILURE)
Main PID: 6210 (code=exited, status=1/FAILURE)
CPU: 20ms
Jun 05 11:20:32 igor-pc systemd[1]: Started Miner..
Jun 05 11:21:32 igor-pc bash[6243]: # Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Jun 05 11:21:32 igor-pc bash[6243]: # Use “-- ” to terminate the options and put the command line to execute after it.
Jun 05 11:21:32 igor-pc bash[6243]: Unable to init server: Could not connect: Connection refused
Jun 05 11:21:32 igor-pc bash[6243]: # Failed to parse arguments: Cannot open display:
Jun 05 11:21:32 igor-pc systemd[1]: startMiner.service: Main process exited, code=exited, status=1/FAILURE
Jun 05 11:21:32 igor-pc systemd[1]: startMiner.service: Failed with result 'exit-code'.
Here is my bash script:
#!/bin/bash
sleep 60
cd /home/igor/Downloads/HPool-Miner-chia-v1.4.0-2-linux/linux
gnome-terminal -e "bash -c \"!!; ./hpool-miner-chia\""
And there is my startMiner.service script:
[Unit]
Description=Miner.
Wants = network-online.target
After = network.target network-online.target
[Service]
Type=simple
ExecStart=/bin/bash /usr/bin/startup.sh
[Install]
WantedBy=multi-user.target
https://azar.pro
Thanks for all the answers.
Last edited on
Chia, the reason 16Tb disks are no longer available.

I need to create a script that runs the miner at startup. ... every time when I trie to get it work
It's clearly unhappy about something. You have a systemd warning about something disabled, and you have warnings about bad command line args, ...

Can you post what you've done?
Last edited on
Topic archived. No new replies allowed.