mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 11:49:42 +08:00
config
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
header("Content-type:application/json");
|
||||
$a=file_get_contents("config.json");
|
||||
$a=file_get_contents("/home/data/Setting/config.json");
|
||||
echo $a;
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$a=parse_ini_file("/home/data/Setting/DeviceSettings.ini",true);
|
||||
|
||||
$numberofsensor=intval($a['DEVICE INFO']['TotalSpectrometer']);
|
||||
$numberofsensor=intval($a['DEVICE INFO']['TotalSpectrometer']);
|
||||
$b=array_values($a);
|
||||
|
||||
echo '<h2>设备信息</h2>';
|
||||
echo '设备数量 '.$numberofsensor.'';
|
||||
echo '<table>';
|
||||
|
@ -4,7 +4,7 @@ exec("ps -ef | grep TowerOptoSifAndSpectral | grep -v grep",$output,$return);
|
||||
//var_dump( $output);
|
||||
if ( count($output)>0)
|
||||
{
|
||||
echo '<div style="width: 20px;height: 20px;background: green"></div>';
|
||||
echo '<div style="width: 40px;height: 20px;background: green"></div>';
|
||||
}else{
|
||||
echo '<div style="width: 20px;height: 20px;background: red"></div>';
|
||||
echo '<div style="width: 40px;height: 20px;background: red"></div>';
|
||||
}
|
@ -1 +1 @@
|
||||
{"BeginTime":"17:49","IntervalTime":"24","EndTime":"18:50","Dev_SN":"1000000","Location":"dasdf","GPS_North":"on","GPS_Longtitude":"123","GPS_Latitude":"123","GPS_Atitude":"50","InstallTime":"2021-12-16","ISIFCalibrationTime":"2021-12-16","IS1CalibrationTime":"2021-12-23","NameOfMaintenance":"123","PhoneOfMaintenance":"123123123","DownloadUserID":"123123","DownlaodAddress":"http:\/\/www.iris-rs.cn","OSIFAlpha_CaliFileMainName":"osifalpha","OSIFBeta_CaliFileMainName":"osifbeta"}
|
||||
{"BeginTime":"","IntervalTime":"","EndTime":"","Dev_SN":"1000000","Location":"","GPS_Longtitude":"","GPS_Latitude":"","GPS_Atitude":"","InstallTime":"","ISIFCalibrationTime":"","IS1CalibrationTime":"","NameOfMaintenance":"","PhoneOfMaintenance":"","DownloadUserID":"","DownlaodAddress":""}
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
file_put_contents("config.json",json_encode($_POST));
|
||||
var_dump($_POST);
|
||||
exec("sudo touch /home/data/Setting/config.json");
|
||||
exec("sudo chmod 777 /home/data/Setting/config.json");
|
||||
file_put_contents("/home/data/Setting/config.json",json_encode($_POST));
|
||||
echo "提交成功";
|
7
html/php/reboot.php
Normal file
7
html/php/reboot.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
echo system("sudo killall TowerOptoSifAndSpectral");
|
||||
echo system("sudo ./reboot.sh &");
|
||||
echo "系统已重启";
|
||||
//var_dump($output);
|
3
html/php/reboot.sh
Normal file
3
html/php/reboot.sh
Normal file
@ -0,0 +1,3 @@
|
||||
cd /home/pi/SIF0/out/build_d/Linux-GCC-Debug/
|
||||
./TowerOptoSifAndSpectral>>log.txt &
|
||||
|
Reference in New Issue
Block a user