Eliminate Linux client configuration file entry Stop the bigfix client, completely remove a setting from the /var/opt/BESClient/besclient.config file (after creating a backup), and restart the Bigfix client (name of operating system as lowercase contains regex "(aix|hp-ux|linux|sunos|vmware") Jeremy Anderson AnderSand-util-001 2011-03-04 x-fixlet-modification-time Sat, 16 Oct 2010 21:27:29 +0000 BESC Click here to deploy this action. action parameter query "SearchPattern" with description "Please enter the setting you would like to remove from the client configuration file" //all content copyright 2011 Jeremy Anderson // Enter your action script here delete __appendfile delete /tmp/restart_besclient.bash delete /tmp/enter_job.bash appendfile #!/bin/bash appendfile CONFIG_FILE=/var/opt/BESClient/besclient.config appendfile SETTING={parameter "SearchPattern" of action} appendfile if [ "x"$SETTING = "x" ]; then appendfile logger "exiting as no search pattern was specified" appendfile exit appendfile fi appendfile /etc/init.d/besclient stop appendfile logger "stopped besclient" appendfile sleep 10 appendfile logger "cleaning $CONFIG_FILE of $SETTING" appendfile cp $CONFIG_FILE $CONFIG_FILE.`date +%s` appendfile sed -i -e "/$SETTING/,+2d" $CONFIG_FILE appendfile sleep 10 appendfile logger "starting besclient" appendfile /etc/init.d/besclient start move __appendfile /tmp/restart_besclient.bash wait chmod +x /tmp/restart_besclient.bash appendfile #!/bin/bash appendfile at now + 5 minutes -f /tmp/restart_besclient.bash move __appendfile /tmp/enter_job.bash wait chmod +x /tmp/enter_job.bash wait /tmp/enter_job.sh