As an experienced CMS website operation personnel for information security, I am well aware of the importance of system stability and management efficiency for content operation.start.shThe issue of whether the PID detection in the scheduled task is still applicable, I can provide you with a detailed answer.
start.shThe script played a core role.The main function of this script is to determine if the AnQiCMS service is running by checking the existence of a specific process ID (PID).nohupThe command starts the executable file of AnQiCMS in the background and configures the script for the Linux systemcrontabSchedule task, typically executed once a minute to achieve automatic monitoring and restart of the program.This mechanism is simple and effective, making up for the lack of direct background restart support in the 2.x version.
This means, when you upgrade AnQiCMS to version 3.x, the originalstart.shThe PID detection mechanism in the scheduled task is no longer recommended or required.anqicmsname runs, and the oldps -ef | grep '\<anqicms\>'命令依然能够检测到它的PID,但服务的管理职责已经从您手动配置的crontab脚本转移到了新的部署环境所提供的管理接口上。
For example, when deploying AnQiCMS 3.x through the "Go project" on the Baota panel, the panel itself is responsible for starting, stopping, restarting, and monitoring the Go application.The panel is built with its own process guardian and management logic, which can manage the lifecycle of Go services more intelligently and comprehensively.start.shThe ability that the script can provide.
start.shScripting, if not properly handled, may cause the service to be restarted repeatedly, lead to chaotic logs, waste of resources, and even interfere with the normal management behavior of the newly deployed environment, thus introducing unnecessary complexity or instability factors.
In short, although the oldstart.sh
Common Questions
Has AnQiCMS 3.x completely abandoned the background process management script?Yes, AnQiCMS 3.x version is designed to simplify deployment and management, especially recommended for deploying 'Go project' through Baota panel and other integrated environments.start.shand similar process management scripts.
How should I manage the AnQiCMS 3.x process if I have not used a management tool like Baota Panel?If your server environment does not use Baota panel, or you choose to manually deploy AnQiCMS 3.x in the command line, you can consider using some professional process management tools such assystemdorSupervisorReplace the old onestart.sh
Keep the old onestart.shWhat specific problems will the script cause?Keep the old onestart.shThe script may cause conflicts in multiple process management. For example, if the Baota panel has been started and is守护ing AnQiCMS, while you have the oldcrontabtasks instart.shScript detected that the process does not exist (it may be due to some reason that it is temporarily unable to bepsCommand capture), it may try to restart AnQiCMS again, which may cause multiple instances of the same service to run, resulting in port conflict, resource waste, and even data inconsistency issues.Moreover, the new version may have optimized the startup logic or dependencies, and the old script may not handle them correctly, leading to startup failure or exceptions.