Where is the default directory of AnQiCMS's `start.sh` and `stop.sh` scripts?

Calendar 👁️ 69

As an experienced website operations expert, I am well aware that a highly efficient and stable content management system (CMS) is crucial for the successful operation of a corporate website.AnQiCMS with its lightweight and efficient Go language stands out among many CMS, providing us with a solid foundation.In the daily system maintenance and troubleshooting, AnQiCMS'sstart.shandstop.shThese service management scripts play a core role. Today, let's delve into where these key scripts usually 'reside' in the AnQiCMS system, as well as their operational logic.

The default destination of AnQiCMS service management script

When deploying AnQiCMS on a Linux server, whether through manual installation via the command line or with the assistance of server management tools such as Baota panel (especially in its outdated deployment methods or non-Go project management mode),start.shandstop.shThese two scriptsThey are stored by default in the installation root directory of AnQiCMS.

This means that they are with the executable file of AnQiCMS main program (usually namedanqicmsThe binary file is closely connected, located in the same folder. For example, if your AnQiCMS project is unzipped and installed in/www/wwwroot/anqicms.com/In the directory, you can usually find this path.start.shandstop.shScripts that quietly wait to be called to start or stop services.

start.shThe working principle of the scripts is associated with their location.

start.shThe main responsibility of the script is to ensure that the AnQiCMS service runs continuously and stably. It is usually integrated into the system's scheduled tasks (such as Linux'scrontabIn order to achieve the self-startup and process guardianship of the service. This script will regularly check if the AnQiCMS main program is running.If the service is detected to have stopped, it will immediately execute the startup command to bring AnQiCMS back online.

Inside the script, you will find something similar toBINPATH=/www/wwwroot/anqicmssuch variable definitions, which explicitly indicate the storage path of the AnQiCMS executable file. Subsequently, it will usenohupThe command starts the AnQiCMS binary file in the background, ensuring that the service continues to provide a stable and continuous supply even if you exit the terminal. Therefore, thestart.shPlace in the root directory of the installation, allowing it to be found and executed most directly and convenientlyanqicmsMain program, ensuring the smoothness of the startup process

stop.shGraceful termination of the script and path adaptation

withstart.shThat is complementarystop.shThe script is responsible for executing the graceful shutdown of the AnQiCMS service. When it is necessary to shut down AnQiCMS,stop.shit will go through system commands such asps -ef | grep '\<anqicms\>')Find the process ID (PID) of the AnQiCMS main program and then send a termination signal(kill -9)to close the process.

It is worth noting that,stop.shThe script shows a certain adaptability in path design. It will go throughBINPATH="$( cd "$( dirname "$0" )" && pwd )"This instruction dynamically retrieves the directory where the script is located. This design further emphasizes the default assumption of coexistence with the AnQiCMS main program file, and allows the script to accurately find and operate on the target process in some cases, even if it is copied to other locations.

considering the position under deployment mode

Althoughstart.shandstop.shThe default location is the installation root directory, but different deployment methods may vary in how directly you perceive them:

  • Command line manual deployment:This is the most direct scenario, the script is located in the directory where you extracted AnQiCMS.
  • Baota panel (Go project mode):In the newer versions of Baota panel, when you use its "Go project" feature to deploy AnQiCMS, Baota panel will automatically manage the startup and shutdown of the service for you. It may still call similar logic in the background, but as a user, you usually no longer need to operate these directly..shScript, instead, it is managed through Baota's graphical interface.
  • Docker container deployment:If you choose to deploy AnQiCMS through Docker containers, thenstart.shandstop.shThese scripts are usually encapsulated within the internal filesystem of Docker images. The Docker engine is responsible for container lifecycle management, and you will go throughdocker run/docker start/docker stopWait for Docker commands to control AnQiCMS service without directly accessing these scripts on the host machine.

As a website operations staff, understanding the location and basic working principles of these scripts is crucial for daily fault diagnosis, version upgrades, custom service management, and even for fine-tuning performance optimization. In short, AnQiCMS'sstart.shandstop.shScripts are the cornerstone of service management in their Linux deployment environment, by default they are stored in the root directory of the project along with the executable files of AnQiCMS, ensuring the stable operation of the website.


Frequently Asked Questions (FAQ)

Q1: If I change the name of the AnQiCMS executable file,start.shandstop.shcan it still work?

A1: If you changeanqicmsthe name of the executable file, for example, fromanqicmshas been changed tomycms, then you needto edit manuallystart.shandstop.shscriptPlease find all references in the scriptBINNAME=anqicmsand change them toBINNAME=mycmsto ensure that the script can find and manage the correct application process. At the same time,stop.shused in the script to find processesgrep '\<anqicms\>'Part also needs to be updated synchronouslygrep '\<mycms\>'.

**Q2: Deploying AnQiCMS with Docker, I still need to pay attention to `start.

Related articles

How to check if the AnQiCMS project has stopped successfully and released the port using the `lsof` command?

## Website Operation Tool: How to check if the AnQiCMS project has stopped successfully and released the port using the `lsof` command?As a high-performance content management system developed based on the Go language, AnQiCMS, while pursuing efficiency, also has refined requirements for the use of server resources.Whether it is for system maintenance, version upgrade, or daily deployment adjustment, ensuring that the AnQiCMS project can stop running cleanly and release the ports it occupies is an indispensable part of website operation.

2025-11-06

What problems may occur if AnQiCMS is restarted immediately after stopping?

## AnQi CMS: What operational risks may be hidden in a hasty restart?As an expert in website operation for many years, I am well aware that each CMS system has its unique operational mechanism, AnQiCMS is no exception.AnQiCMS with its high-performance, modular design based on the Go language and rich enterprise-level features has won the favor of many operators.However, even such an efficient system, if an improper restart operation is performed immediately after stopping, it may also埋下 significant operational risks.

2025-11-06

What related information will the log file of AnQiCMS record after the service stops?

As an experienced website operations expert, I am well aware of the importance of system logs in maintaining website stability and troubleshooting.It is like a black box of an airplane, recording every detail of system operation, especially when the service stops unexpectedly, the log files are our 'golden clues' for quickly locating problems and restoring services.AnQiCMS as an enterprise-level content management system developed based on the Go language has a rigorous and efficient logging mechanism that can provide us with rich information.

2025-11-06

How to judge whether the stop operation of AnQiCMS is 'graceful' or 'forceful'?

As an experienced website operation expert, I am well aware of the powerful strength of AnQiCMS in the content management field.It is built on the Go language, creating a highly efficient, customizable, and easy-to-expand platform.In our daily operations, the startup and shutdown operations of core systems like AnQiCMS are not as simple as running or closing, behind which lies the philosophy of 'elegant' and 'forced', which directly relates to the integrity of website data, the stability of user experience, and the rational release of system resources.

2025-11-06

What negative impacts will there be on the SEO spider crawling the website after the AnQiCMS service is stopped?

As an experienced website operations expert, I know that every CMS system is crucial for the SEO performance of a website, especially systems like AnQiCMS (AnQiCMS) that integrate a large number of SEO-friendly features from the very beginning.It not only provides the efficiency of content management, but also secures a place for the website in search engines through a series of advanced SEO tools.

2025-11-06

How to temporarily disable some features of AnQiCMS without completely stopping it?

## Flexible Control: Disabling Specific AnQiCMS Features Without Interrupting Service As an experienced website operations expert, I know that in our daily work, we often need to fine-tune website features, sometimes to test new modules, sometimes to temporarily disable certain services that are no longer applicable, or to maintain and upgrade without affecting core business.How to temporarily disable some functions of AnQiCMS without completely stopping it?

2025-11-06

What is the relationship between the port configuration in the `config.` file of AnQiCMS and stopping/startup?

In the daily operation and maintenance of AnQi CMS, we often deal with various configuration files.Among them, the `config.` file is undoubtedly one of the 'lifelines' for the operation of AnQiCMS, carrying the core parameters for system startup.Today, as a veteran with many years of experience in website operations, I will delve into the configuration of the `config.` file regarding ports, as well as its inseparable connection with the start and stop of AnQiCMS services.

2025-11-06

How to smoothly migrate old data after stopping the AnQiCMS project and redeploying a new version?

In the dynamic journey of website operation, technological iteration and upgrade is the norm.How can you ensure that the data of the old website can be seamlessly migrated to the new environment when you decide to stop the current AnQiCMS project and plan to deploy a completely new and more powerful version, while minimizing business disruption, which is a key challenge that every operator must face.As an experienced website operations expert, I am well aware of the importance of data. Next, I will elaborate on the strategy and steps of this smooth migration based on the characteristics of AnQiCMS and relevant documents.

2025-11-06