cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted

How to run clish commands via API 'run-script'?

Jump to solution

I'm learning how to correctly use the 'run-script' API call, in addition to using the cpauto 'run_script' wrapper. I've had success with sending simple one-line bash commands per the documented example, but haven't yet figured out the best way to pass in multiline or clish commands to run-script. Does anyone have working examples to share? Thanks!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Employee+
Employee+

Re: How to run clish commands via API 'run-script'?

Jump to solution

I'm using these 2 API's

1. put-file : Check Point - Management API reference 

2. run-script Check Point - Management API reference 

3 Replies
Employee+
Employee+

Re: How to run clish commands via API 'run-script'?

Jump to solution

I'm using these 2 API's

1. put-file : Check Point - Management API reference 

2. run-script Check Point - Management API reference 

Re: How to run clish commands via API 'run-script'?

Jump to solution

That makes sense, thanks. I'm assuming you are pushing out a shell script via 'put-file' and then executing it with 'run-script'? How do you manage cleanup of the scripts after? Seems like a good idea, and I'll check into that more!

0 Kudos
Employee+
Employee+

Re: How to run clish commands via API 'run-script'?

Jump to solution

yes, I'm pushing out a shell script via 'put-file' and then executing it with 'run-script'.

How do you manage cleanup of the scripts after? run-script and the command to delete the file 'rm <filename>'

You can see this post about full flow of run-script : Can we get the routes from R80? 

0 Kudos