How to create an Init script on Centos 6

One way to let the script run even after you close your terminal is by using the “nohup “ (no hangup) command as follows:

nohup ./backup-script &

You still need to find the process id to stop the script when you log back in though. Instead of going through the hassle, we can create an init script and start or stop our backup daemon whenever we need to.

more here

you need vim editor ,here is how you can use vim tutorial

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s