Action Script Execution Issue

Hello All,

When I am executing below action script I am getting an error (Invalid action content: the action script contains a syntax error.
This action has been applied 1 time and will not be applied again.) in Linux/AIX Server, Please cross-check if any modification is required in action script

if (name of operating system as lowercase contains "aix")
download http://xyz:52311/Uploads/te_agent.bin
download http://xyz:52311/Uploads/install.sh
move "__Download/te_agent.bin" "/opt/te_agent.bin"
move "__Download/install.sh" "/opt/install.sh"
wait chmod 755 -x /opt/install.sh
wait chmod +x /opt/te_agent.bin
wait /bin/sh -c /opt/install.sh
appendfile rm /opt/te_agent.bin
appendfile rm /opt/install.sh
appendfile /opt/tripwire/te/agent/bin/twdaemon start 
delete tripwire.sh 
copy __appendfile tripwire.sh 
wait chmod 555 tripwire.sh 
wait /bin/sh tripwire.sh
else (name of operating system as lowercase contains "linux")
download http://xyz52311/Uploads/tripwirelinux/te_agent.bin
download http://xyz:52311/Uploads/tripwirelinux/install.sh
move "__Download/te_agent.bin" "/opt/te_agent.bin"
move "__Download/install.sh" "/opt/install.sh"
wait chmod 755 -x /opt/install.sh
wait chmod +x /opt/te_agent.bin
wait bash /opt/install.sh
appendfile rm /opt/te_agent.bin
appendfile rm /opt/install.sh
appendfile /opt/tripwire/te/agent/bin/twdaemon start 
delete tripwire.sh 
copy __appendfile tripwire.sh
wait chmod 555 tripwire.sh 
wait bash tripwire.sh

It looks like you may need { } instead of ( ) around your if and else conditional statements.

https://developer.bigfix.com/action-script/reference/flow-control/if-elseif-else-endif.html

Also, else would not need a condition statement. Only if and else if use conditional statements.

2 Likes

You should use a prefetch with size/sha1/sha256 instead of a download so that the files can be verified they haven’t been corrupted by the client. (this doesn’t relate to a functional issue, just a recommendation)

2 Likes

oh thanks for the info!!
let me modify my action script.