- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- run bash script using gaia_api
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
run bash script using gaia_api
Hi all
I'm trying to run a bash script via gaia_api but it doesn´t work
I'm using postman to do the POST
---------------https://192.168.32.20:443/gaia_api/login-------------------
date >> va.txt
POST {server}/v1.6/run-script
Content-Type: application/json
X-chkp-sid: {{session}}
{
"script": "date > /home/admin/run_script_example;echo Done"
}
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your output file should have an absolute path.
I suspect your actual script may have other similar issues that result from the script running via run-script versus the CLI environment.
Sharing the actual script used versus a sample might help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your output file should have an absolute path.
I suspect your actual script may have other similar issues that result from the script running via run-script versus the CLI environment.
Sharing the actual script used versus a sample might help.
