%20ap%C3%B3s%20a%20inicializa%C3%A7%C3%A3o%3F%20.png)
Quero executar um comando simples após a inicialização.
cd /mypath
# then
./mycommand
Como eu posso fazer isso?
Responder1
Duas soluções:
A primeira é colocar o caminho completo do comando em /etc/rc.local
:
/mypath/mycommand
ou, o método cron:
crontab -e
@reboot cd /mypath;./mycommand
Do manual do crontab:
@reboot Run once, at startup.