update
This commit is contained in:
@@ -268,9 +268,10 @@ if ($type == "sara_connectNetwork") {
|
||||
$port=$_GET['port'];
|
||||
$timeout=$_GET['timeout'];
|
||||
$networkID=$_GET['networkID'];
|
||||
$command = 'sudo /usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_connectNetwork.py ' . $port . ' ' . $networkID . ' ' . $timeout;
|
||||
$output = shell_exec($command);
|
||||
echo $output;
|
||||
|
||||
echo "updating SARA_R4_networkID in config file";
|
||||
// Convert `networkID` to an integer (or float if needed)
|
||||
$networkID = is_numeric($networkID) ? (strpos($networkID, '.') !== false ? (float)$networkID : (int)$networkID) : 0;
|
||||
#save to config.json
|
||||
$configFile = '/var/www/nebuleair_pro_4g/config.json';
|
||||
// Read the JSON file
|
||||
@@ -297,6 +298,13 @@ if ($type == "sara_connectNetwork") {
|
||||
|
||||
echo "SARA_R4_networkID updated successfully.";
|
||||
|
||||
|
||||
echo "connecting to network... please wait...";
|
||||
$command = 'sudo /usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_connectNetwork.py ' . $port . ' ' . $networkID . ' ' . $timeout;
|
||||
$output = shell_exec($command);
|
||||
echo $output;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#SET THE URL for messaging (profile id 2)
|
||||
|
||||
Reference in New Issue
Block a user