Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums

Building Scripts from the Console

After running Scripts and getting a system running, all is well, until the system is powered down. After a power down, the system will have no devices and your existing configuration will be gone. Depending on the amount of work involved, this may be undesirable. To solve this problem, its possible to copy, save, and replay all the actions performed when configuring a system.

Here, we will describe how to recreate a system by copying commands from the Console. If all you wish to do is create a Script which recreates your current system state, you may find it easier to just copy the entire Session Script.

Saving the Console

As described in the Console History section, the Console has a copy of every user Script or Wires command run on the system. Unlike a Session Script, the Console has every command run since the system started, including any restarts and any of the commands which came before them. When using the Console one can pick and choose from all the commands that have been run on the system.

To get started, go to the Console page. Using your mouse, select all the text (or all the text that has the commands you wish to save) and copy it to a blank file opened in your favorite text editor, or in a new Script you've created using the Create a Script button. Next, delete every status line from your copied text. Your editor should now show a list of only commands. Save the Script. You have created your Script.

Running the Script

Make sure your newly created Script file is somewhere in your Scripts file directories (see the Creating a New Script section for more information on the Scripts directory). A good place to put Scripts that you create is in the "Scripts/user" area.

If you used a terminal session to create your Script, you will need to restart your system. The system keeps a cache of all the Scripts files. The cache is only updated on a restart or when you make changes from within the Virtual Wiring System, so you'll need to restart the system for it to see files created from a terminal session. After a restart, you should see your file. If you put it in the "user" area, use the Scripts View Filter at the top of the Scripts page to make it easier to find.

When you locate your Script, click on its "Run" Action to run the Script. Alternatively, you could run your Script from the Console.

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)

Page last updated: Wed Jul 15 21:50:37 2015 (UTC)