Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I want to deploy a nodejs webapp .
And the nodejs server should be started on boot.
Is there any way to do that ?
You can use pm2 startup script for the same. Please refer the docs on below link
http://pm2.keymetrics.io/docs/usage/startup/
You can put your executable command for your nodejs server in sudo nano /etc/rc.local.
You can put your command in .bash_profile
it will execute when you login
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am pretty new in the cloud-init. I got VM everything is setup and running and I designed the reboot mechanism in the VM to use when VM requires reboot after installing updates. So when I reboot the VM Apache is not working by itself after reboot until I run the start command. Is there a way to make Apache start after every reboot?
problem solved, after reading this two sites
apache-server-doesnt-start-automatically
starting_apache_web_server_at_every_reboot_for_debian_ubuntu_linux
I added this line:
cloud_config['runcmd'].append(['update-rc.d', 'apache2', 'enable'])
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started.
I am using Debian Jessie.
According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Hello guys I just started to use Ubuntu and Ubuntu Server, I'm stuck using the at command.
Don't know how to initiate the command. This is what I'm trying do to:
I'm trying to run this file at 5 AM using the 'at" command
/etc/holler.sh
Thank You In Advance!
You should be able to do that with at -
1) Install at
sudo apt-get install at
2) Schedule your command
at 05:00 /somePathTo/someCommand
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
What is the difference between
service apache2 restart
and
/etc/init.d/apache2 restart
So basically why is the service command recommended compared to directly invoking the appropriate command?
The service command runs the init scripts in a predictable environment:
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /.
from: http://linux.die.net/man/8/service
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have some applications running on a remote CentOs server. I'd want them to restart in case of any unexpected server failures or shutdown or application crashes. Any suggestions on how could i achieve this ?
Just make them "respawn" in inittab. Init can maintain some processes as constantly running. Just set the process you need to continually run to have the action field type of "respawn".
See here.