Posts

Showing posts from April 6, 2019

How to run script on startup with root

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0; } 1 I have my little script to start an application and do some more things on my Ubuntu 16.04 which looks like this: #!/bin/bash ./ROC-smi/rocm-smi -d 1 --setfan 90 ./ROC-smi/rocm-smi -d 0 --setfan 90 ./ROC-smi/rocm-smi -d 2 --setfan 110 ./ROC-smi/rocm-smi -d 3 --setfan 110 ./ROC-smi/rocm-smi -d 4 --setfan 110 cd teamredminer-v0.4.1-linux /usr/bin/screen -dm ./teamredminer --algo=cnr --url=*** --user=*** --pass=*** --watchdog_script I want to autostart it with sudo. I tried rc.local with: sh /path/to/my/script.sh exit 0 I also tried using crontab with: @reboot /path/to/my/script.sh nothing worked, rc.local didn't show any errors when I ...