Make scripts to make your life easier!
This will create the folder for you to store your scrips in.
- Open terminal
- sudo mkdir /scripts
- chmod 770 /scripts
- chown root:nodeadmin /scripts
Create scripts
Scripts are easy to create with nano. They are just the same one line command you would usually run.
- cd /scripts
- nano l1.sh (This will leave and stop L1. Stop means the JAVA process will be stopped)
Your script should contain two lines (two separate commands) - Now press CTRL-X, Y to save and it wants to know the filename and press enter.
- now is you do a ls you will notice the file is not green. Its not in executable status. You must run chmod +x l1.sh
- run ls -l to see the details
You are done! you created your first script. Now all you do is login, cd /scripts and then type ./l1.sh and it will submit the two commands you put in your script. Now that you made your first create another called j1.sh (that joins it). You can stack scripts also. This is what I do.
# cd /scripts
# ./l1.sh ; ./l0.sh ; ./j0.sh
So this command leaves L1, Leaves L0, and then join's L0. That way you run one command, walk away for a cup of coffee and it should be in DIP when you return.
CHECK OUT HOW TO USE IN CRONTAB! which is the Linux scheduler. If there's issues with L1 for example you can schedule your script to run at midnight to freshen it up. (SearchDebug inrelated searchURLs bar| at the top of screen for cron) KB-DAG