Application software generally has such business requirements: When a new version of the APP is available, the program needs to be updated. After the update is completed (the so-called update is mostly in the form of overwriting), there is no need to shut down the computer, but the application can restart itself. I checked some information online, but the descriptions were very complicated. It would be simpler, faster and more brutal to create a script to complete my work in batches. In the program, you can restart through QT's thread library function, or you can simply call an external script to complete the restart work.
As you can see here, The external script contains the following: #!/bin/sh killall -9 my_app echo "restart my_app!" #close backlight echo 0 > /sys/class/backlight/backlight/brightness /opt/app/my_app -qws -nomouse -font wqy-microhei & When the script is executed, it will first call This simply completes the restart of the app. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: Vue implements countdown function
>>: Diagram of the process from uninstallation to installation of MySQL 5.7.18 yum under Linux
1. Time formatting and other methods It is recomm...
【Problem Analysis】 We can use the chown command. ...
CSS adds scrolling to div and hides the scroll ba...
Today, when I was writing a small program, I used...
1. Download and install Download the community ed...
MySQL handles GROUP BY and DISTINCT queries simil...
Table of contents 1. CentOS7+MySQL8.0, yum source...
Configure Mysql master-slave service implementati...
There is only one solution, that is to change the...
Table of contents 1. What is a prototype? 2. Prot...
Use apk add ansible to add the ansible service to...
Server matching logic When Nginx decides which se...
This article uses the element official website an...
This article example shares the specific code of ...
Table of contents 1. Introduction 1. Basic layout...