Run Grin (Grin's shared lib) on boot up? [Linux]

read my guide for linux here AMD grin-miner error
grin-miner.toml is a configuration file for grin-miner
to run the miner automatically after reboot, create a start script like this (it is using tmux to be able to attach back to grin-miner tui):

#!/bin/bash
tmux new-session -d -n mining
tmux send-keys -t mining “cd /opt/grin-miner” C-m
tmux send-keys -t mining “./grin-miner” C-m

and call the script from root’s crontab (crontab -e)
@reboot /root/startmining.sh