Tripp Lite B097048INT Owners Manual for B093- B097- and B098-Series Console Se - Page 240
Running Custom Scripts when a Configurator is Invoked, 1.8 Backing-Up the Configuration
View all Tripp Lite B097048INT manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 240 highlights
15. Advanced Configuration if [ "$LOSS" -eq "100" ] then COUNTER=`expr $COUNTER + 1` else COUNTER=0 sleep 30s fi if [ "$COUNTER" -eq 5 ] then COUNTER=0 "$@" sleep 2s fi done 15.1.7 Running Custom Scripts when a Configurator is Invoked A configurator is responsible for reading the values in /etc/config/config.xml and making the appropriate changes live. Some changes made by the configurators are part of the Linux configuration, such as user passwords or ipconfig. There are currently nineteen configurators, with each responsible for a specific config group (e.g., the "users" configurator makes the user configurations in the config.xml file live). To see all the available configurators, type the following in a command line prompt: # config When a change is made using the management console web GUI, the appropriate configurator is automatically run. This can be problematic; if another user/administrator makes a change using the management console, the configurator could possibly overwrite any custom CLI/linux configurations you may have set. The solution to such a situation is to create a custom script that runs after each configurator has run. After each configurator runs, it will check whether that appropriate custom script exists. You can then add any commands to the custom script that will be invoked after the configurator runs. The custom scripts must be in the correct location: /etc/config/scripts/config-post- To create an alerts custom script: # cd /etc/config/scripts # touch config-post-alerts # vi config-post-alerts This script could be used to recover a specific backup config, overwrite a config, make copies of config files, etc. 15.1.8 Backing-Up the Configuration and Restoring Using a Local USB Drive The /etc/scripts/backup-usb script has been written to save and load custom configuration using a USB flash drive. Before saving the configuration locally, you must prepare the USB storage device for use. To do this, disconnect all USB storage devices, except for the storage device you wish to use. Usage: /etc/scripts/backup-usb COMMAND [FILE] COMMAND: check-magic -- check volume label set-magic -- set volume label save [FILE] -- save configuration to USB delete [FILE] -- delete a configuration tarbal from USB list -- list available config backups on USB load [FILE] -- load a specific config from USB load-default -- load the default configuration set-default [FILE] -- set which file becomes the default 240