Manish
November 28, 2018, 9:22pm
1
Hello All,
I’m using below action script but script is always getting failed while copying the content, Please suggest
appendfile cp /var/opt/BESClient/__BESData/__Global/__Download/svcsnow.txt /var/spool/cron/tabs
appendfile cp /var/opt/BESClient/__BESData/__Global/__Download/snowagent.config /opt/snow
copy __appendfile Snow.sh
wait chmod 555 Snow.sh
wait bash Snow.sh
Aram
November 29, 2018, 12:26am
2
Since the copy command will fail if the destination file exists, it is generally a good practice to include a delete command prior. Perhaps something like the following might work better (if not, Client logs can help troubleshoot):
delete __appendfile
delete Snow.sh
appendfile cp /var/opt/BESClient/__BESData/__Global/__Download/svcsnow.txt /var/spool/cron/tabs
appendfile cp /var/opt/BESClient/__BESData/__Global/__Download/snowagent.config /opt/snow
move __appendfile Snow.sh
wait chmod 555 Snow.sh
wait bash Snow.sh
All that said, why not copy the given files via standard actionscript (https://developer.bigfix.com/action-script/reference/file/copy.html ) rather than creating a shell script?
2 Likes
Manish
December 1, 2018, 2:18pm
3
Actually normal move or copy command is not seems to be working and that is the reason I have created script in shell format.