Answer the question
In order to leave comments, you need to log in
How to autorun a bash script?
Hello. It is necessary that when starting ubuntu, a bash script is executed, which enters the server via ssh and downloads something from there, after that it does not break the connection. Tried to register in /etc/rc.local . However, as I understand it, scripts of this kind will not autostart. Please tell me how to solve this problem.
Answer the question
In order to leave comments, you need to log in
I have always done such things through cron. The command in the terminal to edit the list of scheduled tasks:
Add the line:
I may be wrong, but it seems to work without additional gestures.
Look here - the loading sequence and the behavior of the script at different runlevels.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question