LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Run a Command at Every Bootup?
#1
Somewhat of a general question, using LinuxLite and want to have a command executed when ever the system boots. It's not a "root command", does not need sudo when I do it from the terminal. From my memory since I'm not at that computer the command is:

djmount  /home/linuxlite/av

it just connects to a Upnp server and gets the media. Be nice if it did that at boot. How to do this automatically at boot?

Thanks.

Reply
#2
Hello!

Unless someone suggests a better way, you could add it to your /etc/rc.local file. Of course, you'll have to edit this file as root, using nano or the text editor.

In a terminal window [CTRL-ALT-T],

Code:
sudo nano /etc/rc.local

should allow you to execute that command at startup...

73 DE N4RPS
Rob
[Image: EtYqOrS.png%5D]

A gun in your hand is worth more than a whole police force on the phone.
Reply
#3
Many thanks.
Reply
#4
Just make sure it looks like this

Code:
#!/bin/sh -e
#
# rc.local - executed at the end of each multiuser runlevel
#
# Make sure that the script will "exit 0" on success or any other
# value on error.

all the stuff you wanna run up there...yadda yadda

exit 0
https://unix.stackexchange.com/questions...c-rc-local

Or it might hang
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)