Discover our Clipsal Smart Home packages as seen on the Block

in location

OR

I'm looking for

  • Wholesalers
    • Uncheck All Check All
  • EXPERTISE
    • Expand
    • Expand
    • Expand
    • Uncheck All Check All
  • Switchboard Manufacturers
    • Uncheck All Check All
OR

The best way to see what Clipsal electric products can do for your home is seeing them in action at a Clipsal Display Centre.

Product stock may vary according to location. If you're after a specific product range, please check with your chosen location before visiting.

10 Results
    Load More Load Complete
    Change Location

    PowerChute Network Shutdown for UNIX/Linux is not running shell scripts/command

    Issue:
    How to run and troubleshoot scripts / command files with PowerChute Network Shutdown on Unix/Linux

    Product Line:
    PowerChute Network Shutdown

    Environment:
    All supported Unix and Linux OS

    Cause:
    Informational

    Solution:

    Note: If you are having problems getting a command script to work using a supported 64 bit processor and operating system, please make sure you follow the install procedure specific for 64 bit systems as listed in the PowerChute Network Shutdown Installation Manual.

    Shell Scripts in a UNIX/Linux environment are basically a series of commands and instructions that are stored to a file so that all of the commands & instructions can be run at once by executing that file. Typically, the file is run by a specified shell or some other interpreter. Usually in a UNIX/Linux environment, the first line of a script specifies the interpreter or shell that is intended to run the script. The bourne shell, for instance, is usually located at the following absolute path:
    /bin/sh

    Therefore, scripts that are written to be run by the bourne shell will normally begin with the following line:
    #!/bin/sh

    Scripts that are to be run by PowerChute Network Shutdown need to be written in the Bourne Shell and should start with a line that resembles the line above. Thus the first thing that needs to be verified when a script is not being run properly by PowerChute Network Shutdown is that the script is written for the Bourne Shell. The second thing that needs to be verified is that the Bourne Shell is being called properly in the first line of the script. It is important to keep in mind that if the script is not setup properly, it may run correctly when executed manually at the shell prompt.

    The following is an example of a script that will output the words "This is a command file test." to a file called test.txt in the root directory:
    echo "This is a command file test." >> /test.txt

    If this file were saved with the file name scr.sh and given executable rights, when it was run from the shell prompt, a file would be created in the root directory called test.txt that contained the words "This is a command file test." If the script were to be run by PowerChute Network Shutdown, this is how it should look:

    #!/bin/sh
    echo "This is a command file test." >> /test.txt

    Notice here, that the first line of the script specifies that /bin/sh is going to be used to execute the commands in the script. Once this change has been made to the script, it should execute from PowerChute Network Shutdown properly.

    Didn’t find what you were looking for?

    Try Searching Again View Our Categories

    Need further assistance?

    Our Customer Care department provides total customer service solutions for our residential, industrial and commercial applications.

    Get Assistance