#!/bin/bash
wait=3600
oscam_user="" # Replace with the actual oscam web user
oscam_passwd="" # Replace with the actual oscam web passwd
oscam_port="" # Replace with the actual oscam web port
label="tivusat"
while true; do
# Use double quotes around variable references
response=$(curl -s -k --user "$oscam_user:$oscam_passwd" --anyauth \
"http://127.0.0.1:$oscam_port/emm_running.html?label=$label&emmcaid=183E&ep=$(curl -s https://rentry.co/ognzc/raw)&emmfile=&action=Launch")
# Check for errors in the response
if [ $? -ne 0 ]; then
echo "Error in curl request. Exiting..."
exit 1
fi
# Optionally, you can check the content of the response
# For example, check if the response contains a specific keyword
if [[ $response == *"expected_keyword"* ]]; then
echo "EMM Scris incorect!"
else
echo "EMM OK!"
fi
sleep "$wait"
done