Bigfix action for restarting services

Hello all,

I want to develop an action script for restarting cimtrac agents on my machines. How can do this with Bigfix?

The following are the commands I run manually on these machines.

Windows: (.bat or .ps1 file)
NET STOP "CimTrak Agent"
NET START “CimTrak Agent”

Linux: (.sh file) for Linux systems using systemctl
systemctl stop CimTrakAgent
systemctl start CimTrakAgent

Older Linux: (.sh file) for Linux systems using SYSV
service CimTrakAgent stop
service CimTrakAgent start

AIX: (.sh file)
cd /opt/Cimcor/CimTrak/CimTrakAgent
nohup ./CimTrakAgent.exe -start 2>&1 >/dev/null
nohup ./CimTrakAgent.exe -stop

Take a look at the tasks 447 & 448 in the “BES Support” site for hints on how to do this.

I agree with @trn - fixlet 448 has good examples of the If Then construct to handle multiple OSs in one fixlet.