I'm trying to set up cgminer as a service and make it autostart after boot. The service run fine if I start it myself, but won't autostart after reboot. I'm using Armbian Ubuntu 18.03 Orange Pi Pc.
The start-mine script looks as following:
#!/bin/sh
cd /home/bluudz/git/vthoang/cgminer/
DISPLAY=:0 ./cgminer --config miner.conf
and the cgminer.service
[Unit]
Description=cgminer
After=network.target
After=graphical.target
[Service]
Type=forking
User=bluudz
ExecStart=/usr/bin/screen -LdmS cgminer /home/bluudz/start-miner
ExecStop=/usr/bin/screen -S cgminer -X 'q'
ExecReload=/usr/bin/screen-S cgminer -X stuff "scy'
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Anyone can advice me on what could be done to get the service run on the boot? I have tried for few hours no matter what the service won't start.
Thank you for any advice!