How to start command script in system start up ubuntu
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Command is not working. can you help me to create init script for this same process or command.
Regards,
Mahipal
Doh, it should work! What it the error you get?
You can also use any of the following 2 approaches:
1. Just put the command "/var/www/www.abc.com/start.sh" in a script and then use su to run it:
I cant see any error message as it is running during the system startup and i dont have the console access of the server. i am accessing my server remotely using SSH.
Let me try the above solution. I get back to you soon.
rails@localhost:~$ ./test.sh
Could not find rake-10.3.1 in any of the sources
Run `bundle install` to install missing gems.
I'm not familiar with rails, but from the error above, looks like something is missing.
So as suggested, i.e. run "bundle install" and see what you get
I am running this script from rails user's home directory, If i run the script command in /var/www/www.abc.com directory it will work as all the bundle components are installed in /var/www/www.abc.com directory. so i must have to run ./start.sh script in the said directory. I cant installed bundle components in the rails user's home directory.
I am running this script from rails user's home directory, If i run the script command in /var/www/www.abc.com directory it will work as all the bundle components are installed in /var/www/www.abc.com directory. so i must have to run ./start.sh script in the said directory. I cant installed bundle components in the rails user's home directory.
Regards,
This is what the script of post #22 does:
Changes directory to /var/www/www.abc.com
Runs the ./start.sh
Then you, as root use su or sudo to execute the script with the rails user rights
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.