I'm writing a bash script to make a request on a server to send information via API and change the status about that information.
From terminal this works for me:
curl -s -w "GET" https://mysite/page.php?id=43982934&send=Yhd6yryr87237846dh&status=1";
If I go from browser on the same URL, it works. But when I run this from inside my script with this command, nothing works.
cmd='curl -s -w "GET" https://mysite/page.php?id=43982934&send=Yhd6yryr87237846dh&status=1"';
Tried to run it directly like terminal, but couldn't get it to work.
EDIT
Script is something like this:
#!/bin/bash
cmd='curl -s -w "GET" "https://mysite/page.php?id=43982934&send=Yhd6yryr87237846dh&status=1"'
if [ "$var" != "$extension" ]; then
ffmpeg -i /var/www/html/temp/name.extension -c copy /var/www/html/temp/namefile.extension
fi;
cmd='curl -s -w "GET" "https://mysite/page.php?id=43982934&send=Yhd6yryr87237846dh&status=2"'
I need to set a status for each ffmpeg process!