Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 6749  / 3 Years ago, mon, july 5, 2021, 4:48:19

As of Ubuntu 12.04, what is the proper/clean way to make the system execute a script upon boot? (not upon user login) e.g. running a daemon.


More From » system

 Answers
5

Actually there is a way to execute user specific commands during boot up time. The commands or scripts that we want to execute should be added to the script /etc/rc.local



The script /etc/rc.local will be similar to a shell script. Make sure it's exit status is 0, add the following line to that script "exit 0".



This /etc/rc.local script is executed at the end of each multiuser runlevel.



From here



Also you can see examples in /etc/init.d/


[#36263] Monday, July 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ingsta

Total Points: 391
Total Questions: 103
Total Answers: 124

Location: Bonaire
Member since Wed, Mar 29, 2023
1 Year ago
ingsta questions
Sun, Oct 23, 22, 01:42, 2 Years ago
Sat, Oct 30, 21, 11:27, 3 Years ago
Sun, Nov 28, 21, 12:49, 2 Years ago
;