This commit is contained in:
devdatt 2025-12-19 13:13:06 +05:30
parent 1647294758
commit 8e1e3dd444
2 changed files with 4 additions and 34 deletions

View File

@ -429,9 +429,6 @@ function update_service($which_service)
} else {
echo "Error writing file.";
}
$cmd = 'sudo /bin/sed -i \'s|^GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet video='.$display_resolution.'"|\' /etc/default/grub 2>&1';
exec($cmd);
exec("sudo update-grub");
exec("sudo systemctl enable encoder-main");
exec("sudo systemctl restart encoder-main");
exec("sudo reboot");
@ -450,11 +447,15 @@ function update_service($which_service)
break;
}
$cmd = 'sudo /bin/sed -i \'s|^GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet video='.$display_resolution.'"|\' /etc/default/grub 2>&1';
exec($cmd);
exec("sudo update-grub");
$file = "/var/www/encoder-display.sh";
file_put_contents($file, $display);
exec("sudo systemctl enable encoder-display");
exec("sudo systemctl restart encoder-display");
exec("sudo reboot");
} else {
exec("sudo systemctl stop encoder-display");
exec("sudo systemctl disable encoder-display");

31
tmp.txt
View File

@ -1,31 +0,0 @@
1920x1080@60.00
1920x1080@60.00
1920x1080@59.94
1920x1080i@60.00
1920x1080i@59.94
1920x1080@50.00
1920x1080i@50.00
1920x1080@30.00
1920x1080@29.97
1920x1080@25.00
1920x1080@24.00
1920x1080@23.98
1600x1200@60.00
1680x1050@59.88
1280x1024@60.02
1360x768@60.02
1280x720@60.00
1280x720@59.94
1280x720@50.00
1280x720@30.00
1280x720@29.97
1280x720@25.00
1280x720@24.00
1280x720@23.98
1024x768@60.00
800x600@60.32
720x576i@50.00
720x480i@60.00
720x480i@59.94
640x480@60.00
640x480@59.94