Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bowman_Klinkenb
Participant
Jump to solution

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

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!

0 Kudos
1 Solution

Accepted Solutions
Ofir_Shikolski
Employee
Employee
3 Replies
Ofir_Shikolski
Employee
Employee

I'm using these 2 API's

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

2. run-script Check Point - Management API reference 

Bowman_Klinkenb
Participant

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
Ofir_Shikolski
Employee
Employee

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

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events