Skip to main content

Make scripts to make your life easier!

This will create the folder for you to store your scrips in.

  1. Open terminal
  2. sudo mkdir /scripts
  3. chmod 770 /scripts
  4. 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. 

  1. cd /scripts
  2. 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)

    image.png

  3. Now press CTRL-X, Y to save and it wants to know the filename and press enter.
    image.png
  4. 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
  5. run ls -l to see the details

    image.png

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.   Debug related URLs | KB-DAG


Crontab example

image.png

As of 6/2025 I am running this every 6 hours until L1 is fixed.  Which is the leave L1 script I created.

0 */6 * * * /scripts/l1.sh